|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.ui.button.RolloverButtonAdapter
public class RolloverButtonAdapter
This class allows to add a rollover effect to a JButton. Rollover-enabled buttons have no borders
by default. It is only when the mouse cursor is over the button that the button's borders get painted.
This rollover effect gives the user a visual indication that the button can be pressed (in other words, that the
button is indeed a button), while not cluttering the interface with button borders.
Such buttons are particularly effective for toolbars, where a large number of buttons are usually present.
To 'rollover-enable' a button, the setButtonDecoration(javax.swing.JButton) method must first be called to
set decoration properties. Then, the button must register an instance of RolloverButtonAdapter as a
mouse listener. Note that a single RolloverButtonAdapter instance can be registered with several buttons.
| Constructor Summary | |
|---|---|
RolloverButtonAdapter()
Creates a new RolloverButtonAdapter. |
|
| Method Summary | |
|---|---|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
static void |
setButtonDecoration(javax.swing.JButton button)
Sets the decoration properties required to give the specified button a 'rollover' look and feel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RolloverButtonAdapter()
| Method Detail |
|---|
public static void setButtonDecoration(javax.swing.JButton button)
button - the button to 'rollover-enable'public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard