daoc.editor.ui.panels
Class WindowPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bydaoc.editor.ui.panels.WindowPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, IUpdateListener, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

public class WindowPanel
extends javax.swing.JPanel
implements IUpdateListener, java.awt.event.MouseListener

Presentation of a window.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
WindowPanel(WindowtemplateNode node)
           
 
Method Summary
 ControlNode find(java.lang.String controlId)
           
 int getControlIndex(int x, int y)
          Returns the top node at the given location, or null if no control exists at the given coordinates.
 int getMouseControl(int x, int y)
          Returns the top node at the given location which responds to mouse events, or null if no control exists at the given coordinates.
 java.lang.String getName()
          The name of this window.
 WindowtemplateNode getNode()
          The model that was used to generate this window.
 ControlPanel getSelectedControl()
          Returns the currently selected control panel.
 ControlNode getSelectedNode()
          Returns the currently selected control node.
 boolean hits(int x, int y)
          Returns true of the given point fall in the bounds of this window.
 boolean isVisible()
          Returns true if the window should be displayed in the preview panel.
 void load()
          Loads this window.
 ControlPanel loadControl(javax.swing.tree.TreeNode n)
          Dynamically load a control view based on the node name.
 void mouseClicked(int x, int y)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void moveBy(int x, int y)
          Moves a window by the given distance.
 void nodeAdded(ElementNode node, ElementNode child)
           
 void nodeRemoved(ElementNode node, ElementNode child)
           
 void nodeUpdated(ElementNode node)
           
 void paint(java.awt.Graphics g)
           
 void resizeBy(int x, int y)
          Resizes a window by the given distance.
 void setSelection(ControlNode n)
           
 void setVisible(boolean b)
          Shows / hides window.
 java.lang.String toString()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindowPanel

public WindowPanel(WindowtemplateNode node)
Method Detail

load

public void load()
Loads this window.


loadControl

public ControlPanel loadControl(javax.swing.tree.TreeNode n)
Dynamically load a control view based on the node name.


getName

public java.lang.String getName()
The name of this window.


moveBy

public void moveBy(int x,
                   int y)
Moves a window by the given distance.


resizeBy

public void resizeBy(int x,
                     int y)
Resizes a window by the given distance.


hits

public boolean hits(int x,
                    int y)
Returns true of the given point fall in the bounds of this window.


paint

public final void paint(java.awt.Graphics g)

setVisible

public void setVisible(boolean b)
Shows / hides window.


isVisible

public boolean isVisible()
Returns true if the window should be displayed in the preview panel.


getNode

public WindowtemplateNode getNode()
The model that was used to generate this window.


nodeUpdated

public void nodeUpdated(ElementNode node)
Specified by:
nodeUpdated in interface IUpdateListener

nodeAdded

public void nodeAdded(ElementNode node,
                      ElementNode child)
Specified by:
nodeAdded in interface IUpdateListener

nodeRemoved

public void nodeRemoved(ElementNode node,
                        ElementNode child)
Specified by:
nodeRemoved in interface IUpdateListener

getControlIndex

public int getControlIndex(int x,
                           int y)
Returns the top node at the given location, or null if no control exists at the given coordinates.


getMouseControl

public int getMouseControl(int x,
                           int y)
Returns the top node at the given location which responds to mouse events, or null if no control exists at the given coordinates.


getSelectedControl

public ControlPanel getSelectedControl()
Returns the currently selected control panel.


getSelectedNode

public ControlNode getSelectedNode()
Returns the currently selected control node.


toString

public java.lang.String toString()

setSelection

public void setSelection(ControlNode n)

find

public ControlNode find(java.lang.String controlId)

mouseClicked

public void mouseClicked(int x,
                         int y)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener