Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

novaworx.viewarea
Class ViewPane  view ViewPane download ViewPane.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bynovaworx.viewarea.ViewPane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.SwingConstants
Direct Known Subclasses:
DefaultViewPane

public abstract class ViewPane
extends javax.swing.JComponent
implements javax.swing.SwingConstants, javax.swing.RootPaneContainer

The ViewPane is used by the ViewArea to to construct the view area. This class is abstract and intended to be extended by implementing classes. ViewArea uses a ViewPaneFactory to create ViewPane objects. Custom implementers of ViewPaneFactory must return subclasses of this class.


Nested Class Summary
private  class ViewPane.CloseAction
          The close action.
private  class ViewPane.MaximizeAction
          The maximize action.
private  class ViewPane.PreferenceChangeHandler
          Listenes for changes to important preferences.
private  class ViewPane.RestoreAction
          The restore action.
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  boolean mbSelected
          The selected flag.
(package private)  double mdX1
          The percent X1 value.
(package private)  double mdX2
          The percent X2 value.
(package private)  double mdY1
          The percent Y1 value.
(package private)  double mdY2
          The percent Y2 value.
private  ViewPane.CloseAction moCloseAction
          The close action.
(package private)  ViewDivider moEastDivider
          The divider on the east.
private  ViewPane.MaximizeAction moMaximizeAction
          The maximize action.
(package private)  ViewDivider moNorthDivider
          The divider to the north.
private  ViewPane.PreferenceChangeHandler moPreferenceChangeHandler
          The preference change chandler.
private  java.util.prefs.Preferences moPreferences
          The Preferences node.
private  ViewPane.RestoreAction moRestoreAction
          The restore action.
private  javax.swing.JRootPane moRootPane
          The JRootPane.
(package private)  ViewDivider moSouthDivider
          The divider to the south.
private  ViewHeader moViewHeader
          The header.
(package private)  ViewDivider moWestDivider
          The divider to the west.
private  java.util.Vector mvViewPaneListeners
          The ViewPaneListener list.
 
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.Container
 
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
protected ViewPane(ViewHeader aoViewHeader)
          Construct a ViewPane object.
 
Method Summary
 void addViewPaneListener(ViewPaneListener aoListener)
          Add a ViewPaneListener.
 void close()
          Close the pane.
(package private)  void firePaneActivated()
          Send a pane activated event to all registered listeners.
(package private)  void firePaneClosed()
          Send a pane closed event to all registered listeners.
(package private)  void firePaneDeactivated()
          Send a pane deactivated event to all registered listeners.
(package private)  void firePaneMaximized()
          Send a pane maximized event to all registered listeners.
(package private)  void firePaneMerged()
          Send a pane merged event to all registered listeners.
(package private)  void firePaneResized()
          Send a pane resized event to all registered listeners.
(package private)  void firePaneRestored()
          Send a pane restored event to all registered listeners.
(package private)  void firePaneSplit()
          Send a pane split event to all registered listeners.
(package private)  void firePaneWillClose()
          Send a pane will close event to all registered listeners.
(package private)  void firePaneWillMaximize()
          Send a pane will maximize event to all registered listeners.
(package private)  void firePaneWillMerge()
          Send a pane will merge event to all registered listeners.
(package private)  void firePaneWillRestore()
          Send a pane will restore event to all registered listeners.
(package private)  void firePaneWillSplit()
          Send a pane will split event to all registered listeners.
 java.awt.Container getContentPane()
          Get the content pane.
 java.awt.Component getGlassPane()
          Get the glass pane.
 javax.swing.JLayeredPane getLayeredPane()
          Get the layered pane.
 java.util.prefs.Preferences getPreferences()
          Get the Preferences node for the view area.
 javax.swing.JRootPane getRootPane()
          Get the root pane.
 ViewArea getViewArea()
          Get the ViewArea containing this pane.
 ViewHeader getViewHeader()
          Get the ViewHeader.
 boolean isSelected()
          Is the pane selected.
 boolean isValidateRoot()
          This component is a validation root.
private  void loadPreferences(java.util.prefs.Preferences aoPreferences, java.util.prefs.Preferences aoDefaultPreferences)
          Load the state from the Preferences node.
 void maximize()
          Maximize this pane.
 void removeViewPaneListener(ViewPaneListener aoListener)
          Remove a ViewPaneListener.
 void restore()
          Restore this pane.
protected  void select()
          Called by ViewArea to notify that this pane is selected.
 void setContentPane(java.awt.Container aoPane)
          Set the content pane.
 void setGlassPane(java.awt.Component aoPane)
          Set the glass pane.
 void setIcon(javax.swing.Icon aoIcon)
          The the icon for the pane.
 void setLayeredPane(javax.swing.JLayeredPane aoPane)
          Set the layered pane.
 void setPreferences(java.util.prefs.Preferences aoPreferences, java.util.prefs.Preferences aoDefaultPreferences)
          Set the Preferences node for the view area.
 void setTitle(java.lang.String asTitle)
          Set the title.
protected  void unselect()
          Called by ViewArea to notify that this pane is unselected.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, 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, processMouseEvent, 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, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mbSelected

private boolean mbSelected
The selected flag. This is used to determine if the pane is selected or not. This flag is true unless the pane has been added to a ViewArea object. In such case the ViewArea is responsible for setting the flag.


mdX1

double mdX1
The percent X1 value.


mdY1

double mdY1
The percent Y1 value.


mdX2

double mdX2
The percent X2 value.


mdY2

double mdY2
The percent Y2 value.


moNorthDivider

ViewDivider moNorthDivider
The divider to the north.


moEastDivider

ViewDivider moEastDivider
The divider on the east.


moSouthDivider

ViewDivider moSouthDivider
The divider to the south.


moWestDivider

ViewDivider moWestDivider
The divider to the west.


moViewHeader

private ViewHeader moViewHeader
The header.


moRootPane

private javax.swing.JRootPane moRootPane
The JRootPane.


mvViewPaneListeners

private java.util.Vector mvViewPaneListeners
The ViewPaneListener list.


moMaximizeAction

private ViewPane.MaximizeAction moMaximizeAction
The maximize action.


moRestoreAction

private ViewPane.RestoreAction moRestoreAction
The restore action.


moCloseAction

private ViewPane.CloseAction moCloseAction
The close action.


moPreferences

private java.util.prefs.Preferences moPreferences
The Preferences node.


moPreferenceChangeHandler

private ViewPane.PreferenceChangeHandler moPreferenceChangeHandler
The preference change chandler.

Constructor Detail

ViewPane

protected ViewPane(ViewHeader aoViewHeader)
Construct a ViewPane object.

Method Detail

select

protected void select()
Called by ViewArea to notify that this pane is selected.


unselect

protected void unselect()
Called by ViewArea to notify that this pane is unselected.


isSelected

public boolean isSelected()
Is the pane selected.


setIcon

public void setIcon(javax.swing.Icon aoIcon)
The the icon for the pane.


setTitle

public void setTitle(java.lang.String asTitle)
Set the title.


getViewArea

public ViewArea getViewArea()
Get the ViewArea containing this pane. If the pane is not contained or not contained by a ViewArea object then null is returned.


getViewHeader

public ViewHeader getViewHeader()
Get the ViewHeader.


isValidateRoot

public boolean isValidateRoot()
This component is a validation root.


getRootPane

public javax.swing.JRootPane getRootPane()
Get the root pane.

Specified by:
getRootPane in interface javax.swing.RootPaneContainer

setGlassPane

public void setGlassPane(java.awt.Component aoPane)
Set the glass pane.

Specified by:
setGlassPane in interface javax.swing.RootPaneContainer

getGlassPane

public java.awt.Component getGlassPane()
Get the glass pane.

Specified by:
getGlassPane in interface javax.swing.RootPaneContainer

setLayeredPane

public void setLayeredPane(javax.swing.JLayeredPane aoPane)
Set the layered pane.

Specified by:
setLayeredPane in interface javax.swing.RootPaneContainer

getLayeredPane

public javax.swing.JLayeredPane getLayeredPane()
Get the layered pane.

Specified by:
getLayeredPane in interface javax.swing.RootPaneContainer

setContentPane

public void setContentPane(java.awt.Container aoPane)
Set the content pane.

Specified by:
setContentPane in interface javax.swing.RootPaneContainer

getContentPane

public java.awt.Container getContentPane()
Get the content pane.

Specified by:
getContentPane in interface javax.swing.RootPaneContainer

maximize

public void maximize()
              throws ViewPaneVetoException
Maximize this pane.


restore

public void restore()
             throws ViewPaneVetoException
Restore this pane.


close

public void close()
           throws ViewPaneVetoException
Close the pane. This mostly just sends events since a pane cannot be removed by closing it, only by having it merged by another pane.


addViewPaneListener

public void addViewPaneListener(ViewPaneListener aoListener)
Add a ViewPaneListener.


removeViewPaneListener

public void removeViewPaneListener(ViewPaneListener aoListener)
Remove a ViewPaneListener.


firePaneResized

void firePaneResized()
Send a pane resized event to all registered listeners.


firePaneActivated

void firePaneActivated()
Send a pane activated event to all registered listeners.


firePaneDeactivated

void firePaneDeactivated()
Send a pane deactivated event to all registered listeners.


firePaneWillSplit

void firePaneWillSplit()
                 throws ViewPaneVetoException
Send a pane will split event to all registered listeners.


firePaneSplit

void firePaneSplit()
Send a pane split event to all registered listeners.


firePaneWillMerge

void firePaneWillMerge()
                 throws ViewPaneVetoException
Send a pane will merge event to all registered listeners.


firePaneMerged

void firePaneMerged()
Send a pane merged event to all registered listeners.


firePaneWillMaximize

void firePaneWillMaximize()
                    throws ViewPaneVetoException
Send a pane will maximize event to all registered listeners.


firePaneMaximized

void firePaneMaximized()
Send a pane maximized event to all registered listeners.


firePaneWillRestore

void firePaneWillRestore()
                   throws ViewPaneVetoException
Send a pane will restore event to all registered listeners.


firePaneRestored

void firePaneRestored()
Send a pane restored event to all registered listeners.


firePaneWillClose

void firePaneWillClose()
                 throws ViewPaneVetoException
Send a pane will close event to all registered listeners.


firePaneClosed

void firePaneClosed()
Send a pane closed event to all registered listeners.


setPreferences

public void setPreferences(java.util.prefs.Preferences aoPreferences,
                           java.util.prefs.Preferences aoDefaultPreferences)
Set the Preferences node for the view area. The preferences object handles the state of the view area. Specifically it stores the layout of the dividers and panes.


getPreferences

public java.util.prefs.Preferences getPreferences()
Get the Preferences node for the view area. The preferences object handles the state of the view area. Specifically it stores the layout of the dividers and panes.


loadPreferences

private void loadPreferences(java.util.prefs.Preferences aoPreferences,
                             java.util.prefs.Preferences aoDefaultPreferences)
Load the state from the Preferences node.