|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.tbee.swing.AppleMenu
public class AppleMenu
This panel emulates an "apple menu", meaning that the icons grow when the mouse moves closer. Use ResizingIcon to facilitate growing, but any component can be added and will be resized. Use SwingXUtils.addToolbar specifying minIconSize to add AppleMenu as a toolbar to a component. Note: when using SwingXUtils.addToolbar it probably is wise to set a modifier, in order to prevent the icons to overlap and conflict with other components.
| Nested Class Summary | |
|---|---|
static class |
AppleMenu.Orientation
|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
AppleMenu()
Default SOUTH, 16, 128, no modifiers, no message, activate |
|
AppleMenu(AppleMenu.Orientation orientation)
|
|
AppleMenu(AppleMenu.Orientation orientation,
int minSize,
int maxSize)
|
|
AppleMenu(AppleMenu.Orientation orientation,
int minSize,
int maxSize,
boolean activation)
|
|
AppleMenu(AppleMenu.Orientation orientation,
int minSize,
int maxSize,
int modifiers,
JLabel label)
|
|
| Method Summary | |
|---|---|
void |
doLayout()
In the layout the components are sized and placed |
boolean |
getActivationTreshhold()
ActivationTreshhold |
JLabel |
getLabel()
Label |
int |
getMaxIconSize()
MaxIconSize |
int |
getMinIconSize()
MinIconSize |
Dimension |
getMinimumSize()
The panel must be able to render both the smallest size icons and the largest. |
int |
getModifiers()
Modifiers |
AppleMenu.Orientation |
getOrientation()
Orientation |
Dimension |
getPreferredSize()
And preferred is equal to the minimum |
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent arg0)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent event)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
setActivationTreshhold(boolean value)
|
void |
setLabel(JLabel value)
|
void |
setMaxIconSize(int value)
|
void |
setMinIconSize(int value)
|
void |
setModifiers(int value)
|
void |
setOrientation(AppleMenu.Orientation value)
|
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
| Constructor Detail |
|---|
public AppleMenu()
public AppleMenu(AppleMenu.Orientation orientation)
orientation -
public AppleMenu(AppleMenu.Orientation orientation,
int minSize,
int maxSize)
orientation - minSize - maxSize -
public AppleMenu(AppleMenu.Orientation orientation,
int minSize,
int maxSize,
int modifiers,
JLabel label)
orientation - minSize - maxSize - modifiers - label -
public AppleMenu(AppleMenu.Orientation orientation,
int minSize,
int maxSize,
boolean activation)
orientation - minSize - maxSize - modifiers - label - | Method Detail |
|---|
public AppleMenu.Orientation getOrientation()
public void setOrientation(AppleMenu.Orientation value)
public int getMinIconSize()
public void setMinIconSize(int value)
public int getMaxIconSize()
public void setMaxIconSize(int value)
public boolean getActivationTreshhold()
public void setActivationTreshhold(boolean value)
public int getModifiers()
public void setModifiers(int value)
public JLabel getLabel()
public void setLabel(JLabel value)
public Dimension getMinimumSize()
getMinimumSize in class JComponentpublic Dimension getPreferredSize()
getPreferredSize in class JComponentpublic void doLayout()
doLayout in class Containerpublic void mouseDragged(MouseEvent arg0)
mouseDragged in interface MouseMotionListenerpublic void mouseMoved(MouseEvent event)
mouseMoved in interface MouseMotionListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||