|
||||||||||
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class jmri.jmrit.display.PositionableLabel |
|---|
_control, _controlling, _displayLevel, _editable, _editor, _hidden, _icon, _namedIcon, _positionable, _showTooltip, _text, _tooltip, _viewCoordinates, rb, rbean |
| 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, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, 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(NamedIcon s,
Editor editor)
|
|
MemoryIcon(String s,
Editor editor)
|
|
| Method Summary | |
|---|---|
void |
addKeyAndIcon(NamedIcon icon,
String keyValue)
|
Positionable |
deepClone()
Make a deep copy of Positional object. |
void |
displayState()
Drive the current state of the display from the state of the Memory. |
void |
dispose()
Clean up when this object is no longer needed. |
void |
doMouseClicked(MouseEvent e)
|
protected void |
edit()
|
Positionable |
finishClone(Positionable p)
Finsh the deep Copy of a Positional object. |
NamedIcon |
getDefaultIcon()
|
HashMap<String,NamedIcon> |
getMap()
|
Memory |
getMemory()
|
NamedBeanHandle<Memory> |
getNamedMemory()
|
String |
getNameString()
Methods to add popup menu items return true if a popup item is set |
int |
getOriginalX()
|
int |
getOriginalY()
|
boolean |
isSelectable()
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
resetDefaultIcon()
|
void |
setDefaultIcon(NamedIcon n)
|
boolean |
setEditIconMenu(JPopupMenu popup)
|
void |
setLocation(int x,
int y)
|
void |
setMemory(NamedBeanHandle<Memory> m)
Attached a named Memory to this display item |
void |
setMemory(String pName)
Attached a named Memory to this display item |
void |
setOriginalLocation(int x,
int y)
|
void |
setSelectable(boolean b)
|
boolean |
setTextEditMenu(JPopupMenu popup)
Text edits cannot be done to Memory text - override |
boolean |
showPopUp(JPopupMenu popup)
Call to a Positionable that has unique requirements - e.g. |
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 |
| Methods inherited from interface jmri.jmrit.display.Positionable |
|---|
contains, getBackground, getBounds, getFont, getForeground, getHeight, getLocation, getParent, getPreferredSize, getWidth, getX, getY, invalidate, isOpaque, repaint, setBackground, setBorder, setForeground, setLocation, setOpaque, setSize, setVisible |
| Constructor Detail |
|---|
public MemoryIcon(String s,
Editor editor)
public MemoryIcon(NamedIcon s,
Editor editor)
| Method Detail |
|---|
public Positionable deepClone()
Positionable
deepClone in interface PositionabledeepClone in class PositionableLabelpublic Positionable finishClone(Positionable p)
Positionable
finishClone in interface PositionablefinishClone in class PositionableLabelpublic void resetDefaultIcon()
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 void setMemory(NamedBeanHandle<Memory> m)
m - The Memory objectpublic NamedBeanHandle<Memory> getNamedMemory()
public Memory getMemory()
public HashMap<String,NamedIcon> getMap()
public void addKeyAndIcon(NamedIcon icon,
String keyValue)
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpublic String getNameString()
Positionable
getNameString in interface PositionablegetNameString in class PositionableLabelpublic void setSelectable(boolean b)
public boolean isSelectable()
public boolean showPopUp(JPopupMenu popup)
PositionableLabel
showPopUp in interface PositionableshowPopUp in class PositionableLabelpublic boolean setTextEditMenu(JPopupMenu popup)
setTextEditMenu in interface PositionablesetTextEditMenu in class PositionableLabelpublic void displayState()
public void updateSize()
PositionableLabel
updateSize in interface PositionableupdateSize in class PositionableLabel
public void setOriginalLocation(int x,
int y)
public int getOriginalX()
public int getOriginalY()
public void setLocation(int x,
int y)
setLocation in interface PositionablesetLocation in class Componentpublic boolean setEditIconMenu(JPopupMenu popup)
setEditIconMenu in interface PositionablesetEditIconMenu in class PositionableLabelprotected void edit()
edit in class PositionableLabelpublic void dispose()
PositionableLabel
dispose in class PositionableLabelpublic void doMouseClicked(MouseEvent e)
doMouseClicked in interface PositionabledoMouseClicked in class PositionableLabel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||