|
||||||||||
| 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.JInternalFrame
jmri.jmrit.throttle.AddressPanel
public class AddressPanel
A JInternalFrame that provides a way for the user to enter a decoder address. This class also store AddressListeners and notifies them when the user enters a new address.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JInternalFrame |
|---|
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon |
| 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 javax.swing.JInternalFrame |
|---|
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY |
| 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.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
AddressPanel()
Constructor |
|
| Method Summary | |
|---|---|
void |
addAddressListener(AddressListener l)
Add an AddressListener. |
void |
destroy()
|
void |
dispatchAddress()
Dispatch the current address for use by other throttles |
DccLocoAddress |
getConsistAddress()
|
DccLocoAddress |
getCurrentAddress()
|
RosterEntry |
getRosterEntry()
Get the RosterEntry if there's one for this throttle. |
int |
getRosterSelectedIndex()
Gets the selected index of the roster combo box. |
DccThrottle |
getThrottle()
|
Element |
getXml()
Create an Element of this object's preferences. |
void |
notifyConsistThrottleFound(DccThrottle t)
Get notification that a consist throttle has been found as we requested. |
void |
notifyFailedThrottleRequest(DccLocoAddress address,
String reason)
Get notification that an attempt to request a throttle has failed |
void |
notifyThrottleDisposed()
Receive notification that an address has been release or dispatched. |
void |
notifyThrottleFound(DccThrottle t)
Get notification that a throttle has been found as we requested. |
protected void |
openProgrammer()
Open a programmer for this address |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
releaseAddress()
Release the current address. |
void |
removeAddressListener(AddressListener l)
Remove an AddressListener. |
void |
selectRosterEntry()
"Sets" the current roster entry. |
void |
setAddress(int consistNumber,
boolean b)
|
void |
setBackgroundPanel(BackgroundPanel bp)
|
void |
setConsistAddress(DccLocoAddress consistAddress)
|
void |
setCurrentAddress(DccLocoAddress currentAddress)
|
void |
setRosterEntry(RosterEntry entry)
Set the RosterEntry for this throttle. |
void |
setRosterSelectedIndex(int index)
Sets the selected index of the roster combo box. |
void |
setXml(Element e)
Use the Element passed to initialize based on user prefs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AddressPanel()
| Method Detail |
|---|
public void destroy()
public void addAddressListener(AddressListener l)
l - public void removeAddressListener(AddressListener l)
l - public int getRosterSelectedIndex()
public void setRosterSelectedIndex(int index)
index - the index to select in the combo boxpublic void setBackgroundPanel(BackgroundPanel bp)
public void selectRosterEntry()
public void notifyThrottleFound(DccThrottle t)
notifyThrottleFound in interface ThrottleListenert - An instantiation of the DccThrottle with the address
requested.
public void notifyFailedThrottleRequest(DccLocoAddress address,
String reason)
ThrottleListener
notifyFailedThrottleRequest in interface ThrottleListeneraddress - DccLocoAddress of the failed loco request.reason - The reason why the throttle request failed.public void notifyConsistThrottleFound(DccThrottle t)
t - An instantiation of the DccThrottle with the address
requested.public void notifyThrottleDisposed()
public RosterEntry getRosterEntry()
public void setRosterEntry(RosterEntry entry)
protected void openProgrammer()
public void dispatchAddress()
public void releaseAddress()
public Element getXml()
public void setXml(Element e)
e - The Element containing prefs as defined in DTD/throttle-configpublic DccThrottle getThrottle()
public DccLocoAddress getCurrentAddress()
public void setCurrentAddress(DccLocoAddress currentAddress)
public void setAddress(int consistNumber,
boolean b)
public DccLocoAddress getConsistAddress()
public void setConsistAddress(DccLocoAddress consistAddress)
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||