|
||||||||||
| 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.JLabel
jmri.jmrit.display.PositionableLabel
jmri.jmrit.display.MemoryIcon
public class MemoryIcon
An icon to display a status of a Memory.
The value of the memory can't be changed with this icon.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JLabel |
|---|
JLabel.AccessibleJLabel |
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class jmri.jmrit.display.PositionableLabel |
|---|
icon, ours, popup, text |
| Fields inherited from class javax.swing.JLabel |
|---|
labelFor |
| 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 javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MemoryIcon()
|
|
| Method Summary | |
|---|---|
void |
addKeyAndIcon(NamedIcon icon,
String keyValue)
|
void |
dispose()
Clean up when this object is no longer needed. |
NamedIcon |
getDefaultIcon()
|
HashMap |
getMap()
|
Memory |
getMemory()
|
boolean |
isSelectable()
|
protected int |
maxHeight()
This may be called during the superclass ctor, so before construction of this object is complete. |
protected int |
maxWidth()
This may be called during the superclass ctor, so before construction of this object is complete. |
void |
mouseClicked(MouseEvent e)
Clicks are ignored |
void |
propertyChange(PropertyChangeEvent e)
|
void |
setDefaultIcon(NamedIcon n)
|
void |
setMemory(String pName)
Attached a named Memory to this display item |
void |
setProperToolTip()
|
void |
setSelectable(boolean b)
|
protected void |
showPopUp(MouseEvent e)
Pop-up displays the Memory name, allows you to remove the icon. |
void |
updateSize()
Update the AWT and Swing size information due to change in internal state, e.g. if one or more of the icons that might be displayed is changed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryIcon()
| Method Detail |
|---|
public void setDefaultIcon(NamedIcon n)
public NamedIcon getDefaultIcon()
public void setMemory(String pName)
pName - Used as a system/user name to lookup the Memory objectpublic Memory getMemory()
public HashMap getMap()
public void addKeyAndIcon(NamedIcon icon,
String keyValue)
protected int maxHeight()
maxHeight in class PositionableLabelprotected int maxWidth()
maxWidth in class PositionableLabelpublic void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpublic void setProperToolTip()
setProperToolTip in class PositionableLabelpublic void setSelectable(boolean b)
public boolean isSelectable()
protected void showPopUp(MouseEvent e)
Rotate is not supported for text-holding memories
Because this class can change between icon and text forms, we recreate the popup object each time.
showPopUp in class PositionableLabelpublic void updateSize()
PositionableLabel
updateSize in class PositionableLabelpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenermouseClicked in class PositionableLabele - public void dispose()
PositionableLabel
dispose in class PositionableLabel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||