public class MyMenuButton extends Canvas implements ActionCommand
Canvas.AccessibleAWTCanvas
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected String |
actionCommand
Description of the Field
|
private ActionListener |
actionListener
Description of the Field
|
private String |
className
Description of the Field
|
private int |
instanceCurrentNumber
Description of the Field
|
private static int |
instanceNumber
Description of the Field
|
protected String |
label
Description of the Field
|
protected boolean |
pressed
Description of the Field
|
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
MyMenuButton()
Constructor for the MyMenuButton object
|
MyMenuButton(String string)
Constructor for the MyMenuButton object
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener actionlistener)
Adds a feature to the ActionListener attribute of the MyMenuButton object
|
String |
getActionCommand()
Gets the actionCommand attribute of the MyMenuButton object
|
String |
getLabel()
Gets the label attribute of the MyMenuButton object
|
Dimension |
getMinimumSize()
Gets the minimumSize attribute of the MyMenuButton object
|
String |
getName()
Gets the name attribute of the MyMenuButton object
|
Dimension |
getPreferredSize()
Gets the preferredSize attribute of the MyMenuButton object
|
void |
paint(Graphics graphics)
Description of the Method
|
void |
processMouseEvent(MouseEvent mouseevent)
Description of the Method
|
void |
removeActionListener(ActionListener actionlistener)
Description of the Method
|
void |
setActionCommand(String string)
Sets the actionCommand attribute of the MyMenuButton object
|
void |
setLabel(String string)
Sets the label attribute of the MyMenuButton object
|
void |
setName(String string)
Sets the name attribute of the MyMenuButton object
|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
private static int instanceNumber
protected String actionCommand
protected boolean pressed
private int instanceCurrentNumber
private ActionListener actionListener
public MyMenuButton()
public MyMenuButton(String string)
string
- Description of the Parameterpublic void setActionCommand(String string)
setActionCommand
in interface ActionCommand
string
- The new actionCommand valuepublic String getActionCommand()
getActionCommand
in interface ActionCommand
public void processMouseEvent(MouseEvent mouseevent)
processMouseEvent
in class Component
mouseevent
- Description of the Parameterpublic void removeActionListener(ActionListener actionlistener)
actionlistener
- Description of the Parameterpublic void addActionListener(ActionListener actionlistener)
actionlistener
- The feature to be added to the ActionListener
attributepublic Dimension getPreferredSize()
getPreferredSize
in class Component
public Dimension getMinimumSize()
getMinimumSize
in class Component
public void setLabel(String string)
string
- The new label valueWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses