|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.MouseAdapter
edu.stanford.nlp.swing.ButtonRolloverBorderAdapter
MouseListener to only show the border of a button on rollover.
A common UI practice, especially in toolbars, is to normally render buttons
with their icon/text but no surrounding border, and only to show the border
when the mouse is over the button. Java buttons don't normally do this. To
enable that behavior, call ButtonRolloverBorderAdapter.manageButton
on your button (this only works for subclasses of AbstractButton, i.e.
most swing buttons but not AWT). As a convinience, you can also call
ButtonRolloverBorderAdapter.manageToolBar
to enable
this behavior for all buttons on the given toolbar.
Method Summary | |
static void |
manageButton(AbstractButton button)
Adds rollover-border behavior to the given button. |
static void |
manageToolBar(JToolBar toolBar)
Adds rollover-border behavior to all the buttons in the given toolbar. |
void |
mouseEntered(MouseEvent e)
If e.getSource is an AbstractButton, shows its border. |
void |
mouseExited(MouseEvent e)
If e.getSource is an AbstractButton, hides its border. |
Methods inherited from class java.awt.event.MouseAdapter |
mouseClicked, mousePressed, mouseReleased |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void manageButton(AbstractButton button)
public static void manageToolBar(JToolBar toolBar)
manageButton(javax.swing.AbstractButton)
public void mouseExited(MouseEvent e)
public void mouseEntered(MouseEvent e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |