package awt; import java.applet.*; import java.lang.*; import java.util.*; import java.awt.*; import java.awt.event.*;
Open look style menu button |
When the user pushes the button, an ActionEvent is posted. The application may then render a popup menu (on-the-fly generated popup menu), or do nothing in case the popup menu was already rendered (statically generated popup menu). |
Constructs a Button with no label. |
Constructs a Button with the specified label. @param label the label of the button |
gets the label @see setLabel |
sets the label @see getLabel |
factor is e.g. 0.7 |
Close all child popups |
Close this popup and all children |
User pressed something inside the popup windows; close them all. |
JDK 1.1.5 behaves oddly: when you call setBounds() on a child of a Window, that Window will never show up!!! Unfortunately, this is precisely what pack() does ... so we add a Panel, on which we never call setBounds(), and do everything there ... (sigh) |
null if standard behaviour; if jdk1.1.5, then all stuff is done on the panel, not on the window itself |
getparent() returns the Frame the popup belongs to. In parentComp, we store the menu button this popup belongs to |
At the next setVisible(true), this Window will be packed first. |
Register the button this popup belongs to |
Listen to all buttons, ... inside this container |
Default implementation of pack(), with a jdk1.1.5 quirkaround. |
Besides the default pack(), we try to increase the number of columns if the popup window becomes too high. |