jmri.jmrit.throttle
Class ThrottleFrame
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLayeredPane
javax.swing.JDesktopPane
jmri.jmrit.throttle.ThrottleFrame
- All Implemented Interfaces:
- ComponentListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, AddressListener
public class ThrottleFrame
- extends JDesktopPane
- implements ComponentListener, AddressListener
Should be named ThrottlePanel but was already existing with that name
and don't want to break dependencies (particularly in Jython code)
- Author:
- Glen Oberhauser, Andrew Berridge Copyright 2010
- See Also:
- Serialized Form
| Methods inherited from class javax.swing.JDesktopPane |
addImpl, getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getDragMode, getSelectedFrame, getUI, getUIClassID, paramString, remove, removeAll, selectFrame, setComponentZOrder, setDesktopManager, setDragMode, setSelectedFrame, setUI, updateUI |
| Methods inherited from class javax.swing.JLayeredPane |
getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, setLayer, setLayer, setPosition |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
ThrottleFrame
public ThrottleFrame(ThrottleWindow tw)
getDefaultThrottleFolder
public static String getDefaultThrottleFolder()
getDefaultThrottleFilename
public static String getDefaultThrottleFilename()
setDefaultThrottleLocation
public static void setDefaultThrottleLocation(String location)
getThrottleWindow
public ThrottleWindow getThrottleWindow()
getControlPanel
public ControlPanel getControlPanel()
getFunctionPanel
public FunctionPanel getFunctionPanel()
getAddressPanel
public AddressPanel getAddressPanel()
getRosterEntry
public RosterEntry getRosterEntry()
toFront
public void toFront()
setLocation
public void setLocation(int x,
int y)
- Sets the location of a throttle frame on the screen
according to x and y coordinates
- Overrides:
setLocation in class Component
- See Also:
Component.setLocation(int, int)
setTitle
public void setTitle(String txt)
getTitle
public String getTitle()
loadThrottle
public void loadThrottle(String sfile)
ynstrument
public JInternalFrame ynstrument(String path)
makeAllComponentsInBounds
public void makeAllComponentsInBounds()
switchMode
public void switchMode()
dispose
public void dispose()
- Handle my own destruction.
- dispose of sub windows.
- notify my manager of my demise.
saveRosterChanges
public void saveRosterChanges()
getXml
public Element getXml()
- Collect the prefs of this object into XML Element
- Window prefs
- ControlPanel
- FunctionPanel
- AddressPanel
- Returns:
- the XML of this object.
getXmlFile
public Element getXmlFile()
setXml
public void setXml(Element e)
- Set the preferences based on the XML Element.
- Window prefs
- Frame title
- ControlPanel
- FunctionPanel
- AddressPanel
- Parameters:
e - The Element for this object.
setFrameTitle
public void setFrameTitle()
- setFrameTitle - set the frame title based on type, text and address
componentHidden
public void componentHidden(ComponentEvent e)
- Specified by:
componentHidden in interface ComponentListener
componentMoved
public void componentMoved(ComponentEvent e)
- Specified by:
componentMoved in interface ComponentListener
componentResized
public void componentResized(ComponentEvent e)
- Specified by:
componentResized in interface ComponentListener
componentShown
public void componentShown(ComponentEvent e)
- Specified by:
componentShown in interface ComponentListener
saveThrottle
public void saveThrottle()
saveThrottleAs
public void saveThrottleAs()
notifyAddressChosen
public void notifyAddressChosen(int newAddress,
boolean isLong)
- Description copied from interface:
AddressListener
- Receive notification that a new address has been selected.
- Specified by:
notifyAddressChosen in interface AddressListener
- Parameters:
newAddress - The address that is now selected.
notifyAddressReleased
public void notifyAddressReleased(int address,
boolean isLong)
- Description copied from interface:
AddressListener
- Receive notification that an address has been released/dispatched
- Specified by:
notifyAddressReleased in interface AddressListener
- Parameters:
address - The address released/dispatched
notifyAddressThrottleFound
public void notifyAddressThrottleFound(DccThrottle throttle)
- Description copied from interface:
AddressListener
- Receive notification that a throttle has been found
- Specified by:
notifyAddressThrottleFound in interface AddressListener
- Parameters:
throttle - The throttle
getLastUsedSaveFile
public String getLastUsedSaveFile()
setLastUsedSaveFile
public void setLastUsedSaveFile(String lusf)
setTransparentBackground
public static void setTransparentBackground(JComponent jcomp)
setTransparentBackground
public static void setTransparentBackground(Component[] comps)
setTransparent
public static void setTransparent(JComponent jcomp)
setTransparent
public static void setTransparent(JComponent jcomp,
boolean transparency)
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: