JIDE 3.5.15

com.jidesoft.dashboard
Class DashboardDocumentPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.swing.JideSplitPane
                      extended by com.jidesoft.document.DocumentPane
                          extended by com.jidesoft.dashboard.DashboardDocumentPane
All Implemented Interfaces:
DashboardHolder, DashboardListener, GadgetListener, GadgetPaletteInstaller, IDocumentPane, TabEditingListener, ComponentListener, ContainerListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, ChangeListener, SwingConstants

public class DashboardDocumentPane
extends DocumentPane
implements TabEditingListener, GadgetListener, DashboardListener, GadgetPaletteInstaller, DashboardHolder

DashboardDocumentPane contains several dashboards and uses DocumentPane to arrange them. Each document in DocumentPane is a Dashboard.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.document.DocumentPane
DocumentPane.DocumentTabColorProvider, DocumentPane.TabbedPaneCustomizer
 
Nested classes/interfaces inherited from class com.jidesoft.swing.JideSplitPane
JideSplitPane.AccessibleJideSplitPane
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
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
 DocumentComponentAdapter _documentComponentListener
           
 PropertyChangeListener _propertyChangeListener
           
 
Fields inherited from class com.jidesoft.document.DocumentPane
_tabPlacement, CONTEXT_MENU_CANCEL, CONTEXT_MENU_CHANGE_ORIENTATION, CONTEXT_MENU_CLOSE, CONTEXT_MENU_CLOSE_ALL, CONTEXT_MENU_CLOSE_OTHERS, CONTEXT_MENU_DOCKING, CONTEXT_MENU_FLOATING, CONTEXT_MENU_MOVE_TO_NEXT, CONTEXT_MENU_MOVE_TO_PREVIOUS, CONTEXT_MENU_MOVE_TO_THIS, CONTEXT_MENU_NEW_HORIZONTAL_GROUP, CONTEXT_MENU_NEW_VERTICAL_GROUP, CONTEXT_MENU_NEXT, CONTEXT_MENU_PREVIOUS, CONTEXT_MENU_SPLIT_HORIZONTALLY, CONTEXT_MENU_SPLIT_VERTICALLY, PROPERTY_FLOATING_CONTAINER_TYPE, PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED, PROPERTY_MAXIMUM_GROUP_COUNT, TABBED_DOCUMENT_INTERFACE
 
Fields inherited from class com.jidesoft.swing.JideSplitPane
_windowDeactivatedListener, CONTINUOUS_LAYOUT_PROPERTY, DIVIDER_SIZE_PROPERTY, GRIPPER_PROPERTY, HORIZONTAL_SPLIT, NON_CONTINUOUS_DIVIDER, ONE_TOUCH_EXPANDABLE_PROPERTY, ORIENTATION_PROPERTY, PROPERTY_DIVIDER_LOCATION, PROPORTIONAL_LAYOUT_PROPERTY, PROPORTIONS_PROPERTY, VERTICAL_SPLIT
 
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, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface com.jidesoft.document.IDocumentPane
CLOSE_ACTION_TO_CLOSE, CLOSE_ACTION_TO_DOCK, FLOATING_CONTAINER_TYPE_DIALOG, FLOATING_CONTAINER_TYPE_FRAME
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DashboardDocumentPane()
           
DashboardDocumentPane(GadgetManager gadgetManager)
           
 
Method Summary
 void closeAll()
          Closes all documents.
 Dashboard createDashboard(String key)
          Creates the dashboard added by the add button.
protected  DocumentComponent createDocumentComponent(Dashboard dashboard)
           
protected  GadgetPalette createGadgetPalette()
           
protected  Container createToolBarComponent()
           
 void editingCanceled(TabEditingEvent e)
          This tells the listeners the tab editing is canceled
 void editingStarted(TabEditingEvent e)
          This tells the listeners the tab editing is started
 void editingStopped(TabEditingEvent e)
          This tells the listeners the tab editing is stopped
 void eventHappened(DashboardEvent e)
          Invoked when a Gadget event happened
 void eventHappened(GadgetEvent e)
          Invoked when a Gadget event happened
 Dashboard getActiveDashboard()
           
 Dashboard getDashboardAt(int index)
          Gets the dashboard at the specified index.
 int getDashboardCount()
          Gets the total number of dashboard.
 GadgetManager getGadgetManager()
          Gets the gadget manager.
protected  ImageIcon getImageIcon(String name)
          Gets the image icons that is used in PropertyPane.
 int getPaletteSide()
          Gets the palette side.
protected  String getResourceString(String key)
          Gets the localized string from resource bundle.
 int getToolBarAlignment()
          Gets the toolbar alignment.
 Container getValidParent(Component c)
           
 void hidePalette()
          Hides the palette.
 int indexOfDashboard(Dashboard dashboard)
          Gets the index of the dashboard.
protected  void initComponents()
           
protected  boolean isDocumentGroupEmpty(IDocumentGroup documentGroup)
          Checks if the document group is empty.
 boolean isPaletteVisible(Component invoker)
          Checks if the palette is visible.
 boolean isUseFloatingPalette()
           
 void setActiveDocument(String name, boolean requestFocus)
          Sets the document that is identified by name as active.
 void setPaletteSide(int paletteSide)
          Sets the palette side.
 void setToolBarAlignment(int alignment)
          Sets the toolbar location.
 void setUseFloatingPalette(boolean useFloatingPalette)
           
 void showPalette(Component invoker)
          Shows the palette.
 void togglePalette(Component invoker)
          Toggles the palette visibility.
 
Methods inherited from class com.jidesoft.document.DocumentPane
activateGroup, addNotify, closeAllButThis, closeDocument, closeDocuments, closeSingleDocument, createDocumentGroup, createFloatingDocumentContainer, createSplitPaneDivider, createTdiGroup, customizePopupMenu, dispose, dockDocument, dockDocuments, floatDocument, floatDocument, floatDocument, getActiveDocument, getActiveDocumentName, getBackground, getDocument, getDocumentAt, getDocumentComponentFactory, getDocumentCount, getDocumentGroup, getDocumentGroupAt, getDocumentGroupCount, getDocumentGroupIndexAt, getDocumentNameAt, getDocumentNames, getFloatingContainerCloseAction, getFloatingContainers, getFloatingContainerTitle, getFloatingContainerType, getLayoutPersistence, getMaximumGroupCount, getNameOf, getNextAvailableIndex, getNextDocument, getPopupMenuCustomizer, getPreviousDocument, getSelectedIndexAtGroupIndex, getTabbedPaneCustomizer, getTabColorProvider, getTabPlacement, getTitleConverter, groupIndexOfDocument, indexOfDocument, indexOfDocumentGroup, isDocumentFloating, isDocumentOpened, isDragPassUnmovableAllowed, isFloatingAllowed, isFocusCycleRoot, isGroupsAllowed, isHeavyweightComponentEnabled, isMoreDocumentGroupAllowed, isRearrangeAllowed, isReorderAllowed, isShowContextMenu, isUpdateTitle, isUseGlassPaneEnabled, moveDocument, moveDocument, newDocumentGroup, nextDocument, openDocument, openDocument, populateContextMenu, populateContextMenu, prevDocument, propertyChange, removeNotify, renameDocument, requestFocusForActiveDocument, setActiveDocument, setDocumentComponentFactory, setDocumentEnabled, setDragPassUnmovableAllowed, setFloatingAllowed, setFloatingContainerCloseAction, setFloatingContainerType, setGroupsAllowed, setHeavyweightComponentEnabled, setMaximumGroupCount, setOpenedDocuments, setPopupMenuCustomizer, setRearrangeAllowed, setReorderAllowed, setShowContextMenu, setTabbedPaneCustomizer, setTabColorProvider, setTabPlacement, setTitleConverter, setUpdateTitle, setUseGlassPaneEnabled, splitDocument, stateChanged, updateDocument, updateUI
 
Methods inherited from class com.jidesoft.swing.JideSplitPane
addExtraDividers, addPane, addProportion, componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, doLayout, dragDividerTo, finishDraggingTo, getAccessibleContext, getDividerAt, getDividerLocation, getDividerLocations, getDividerSize, getDividerStepSize, getLeftOneTouchButtonImageIcon, getNextDividerLocation, getOrientation, getPaneAt, getPaneCount, getPreviousDividerLocation, getProportions, getRightOneTouchButtonImageIcon, indexOf, indexOfDivider, indexOfPane, insertPane, insertPane, isContinuousLayout, isDragResizable, isInitiallyEven, isOneTouchExpandable, isProportionalLayout, isShowGripper, isValidateRoot, removeExtraDividers, removePane, removePane, removeProportion, resetToPreferredSizes, setContinuousLayout, setDividerLocation, setDividerLocation, setDividerLocations, setDividerSize, setDividerStepSize, setDividersVisible, setDragResizable, setInitiallyEven, setLeftOneTouchButtonImageIcon, setOneTouchExpandable, setOrientation, setPaneAt, setPaneAt, setProportionalLayout, setProportions, setRightOneTouchButtonImageIcon, setShowGripper, setVisible, startDragging
 
Methods inherited from class javax.swing.JPanel
getUI, getUIClassID, paramString, setUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, 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, 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, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_documentComponentListener

public DocumentComponentAdapter _documentComponentListener

_propertyChangeListener

public PropertyChangeListener _propertyChangeListener
Constructor Detail

DashboardDocumentPane

public DashboardDocumentPane()

DashboardDocumentPane

public DashboardDocumentPane(GadgetManager gadgetManager)
Method Detail

editingStarted

public void editingStarted(TabEditingEvent e)
Description copied from interface: TabEditingListener
This tells the listeners the tab editing is started

Specified by:
editingStarted in interface TabEditingListener

editingStopped

public void editingStopped(TabEditingEvent e)
Description copied from interface: TabEditingListener
This tells the listeners the tab editing is stopped

Specified by:
editingStopped in interface TabEditingListener

editingCanceled

public void editingCanceled(TabEditingEvent e)
Description copied from interface: TabEditingListener
This tells the listeners the tab editing is canceled

Specified by:
editingCanceled in interface TabEditingListener

getGadgetManager

public GadgetManager getGadgetManager()
Description copied from interface: DashboardHolder
Gets the gadget manager.

Specified by:
getGadgetManager in interface DashboardHolder
Returns:
the gadget manager.

initComponents

protected void initComponents()

createToolBarComponent

protected Container createToolBarComponent()

createDashboard

public Dashboard createDashboard(String key)
Creates the dashboard added by the add button.

Specified by:
createDashboard in interface DashboardHolder
Parameters:
key - the key for the dashboard.
Returns:
a newly created dashboard.

isDocumentGroupEmpty

protected boolean isDocumentGroupEmpty(IDocumentGroup documentGroup)
Description copied from class: DocumentPane
Checks if the document group is empty.

Overrides:
isDocumentGroupEmpty in class DocumentPane
Parameters:
documentGroup - the document group
Returns:
true if the document group is empty. Otherwise false.

eventHappened

public void eventHappened(GadgetEvent e)
Description copied from interface: GadgetListener
Invoked when a Gadget event happened

Specified by:
eventHappened in interface GadgetListener
Parameters:
e - GadgetEvent

eventHappened

public void eventHappened(DashboardEvent e)
Description copied from interface: DashboardListener
Invoked when a Gadget event happened

Specified by:
eventHappened in interface DashboardListener
Parameters:
e - GadgetEvent

createDocumentComponent

protected DocumentComponent createDocumentComponent(Dashboard dashboard)

setActiveDocument

public void setActiveDocument(String name,
                              boolean requestFocus)
Description copied from class: DocumentPane
Sets the document that is identified by name as active.
This method is Swing thread-safe.

Specified by:
setActiveDocument in interface IDocumentPane
Overrides:
setActiveDocument in class DocumentPane
Parameters:
name - the name of the document.
requestFocus - if the active document will request focus.

getDashboardCount

public int getDashboardCount()
Gets the total number of dashboard.

Returns:
the total number of dashboard.

getDashboardAt

public Dashboard getDashboardAt(int index)
Gets the dashboard at the specified index.

Parameters:
index - the index.
Returns:
the dashboard at the specified index.

indexOfDashboard

public int indexOfDashboard(Dashboard dashboard)
Gets the index of the dashboard.

Parameters:
dashboard - the index.
Returns:
the dashboard at the specified index.

togglePalette

public void togglePalette(Component invoker)
Toggles the palette visibility.

Parameters:
invoker - the invoker that calls to this togglePalette method.

getValidParent

public Container getValidParent(Component c)

isPaletteVisible

public boolean isPaletteVisible(Component invoker)
Checks if the palette is visible.

Parameters:
invoker - the invoker which calls this method.
Returns:
true if the palette is visible. Otherwise false.

setPaletteSide

public void setPaletteSide(int paletteSide)
Sets the palette side.

Parameters:
paletteSide - the palette side

getPaletteSide

public int getPaletteSide()
Gets the palette side. It should be WEST, EAST, NORTH or SOUTH. By default, it's SOUTH.

Specified by:
getPaletteSide in interface GadgetPaletteInstaller
Returns:
the palette side.
See Also:
setPaletteSide(int)

showPalette

public void showPalette(Component invoker)
Shows the palette.

Specified by:
showPalette in interface GadgetPaletteInstaller
Parameters:
invoker - the invoker which calls this method.

createGadgetPalette

protected GadgetPalette createGadgetPalette()

hidePalette

public void hidePalette()
Description copied from interface: GadgetPaletteInstaller
Hides the palette.

Specified by:
hidePalette in interface GadgetPaletteInstaller

getActiveDashboard

public Dashboard getActiveDashboard()
Specified by:
getActiveDashboard in interface DashboardHolder

isUseFloatingPalette

public boolean isUseFloatingPalette()

setUseFloatingPalette

public void setUseFloatingPalette(boolean useFloatingPalette)

setToolBarAlignment

public void setToolBarAlignment(int alignment)
Sets the toolbar location. It could be SwingConstants.LEADING or SwingConstants.TRAILING. If leading, it will appear before the tabs.Otherwise, it will be after the tabs.

Parameters:
alignment - the toolbar alignment

getToolBarAlignment

public int getToolBarAlignment()
Gets the toolbar alignment. It will return SwingConstants.LEADING or SwingConstants.TRAILING or -1 if there is no toolbar installed.

Returns:
the toolbar alignment.

getImageIcon

protected ImageIcon getImageIcon(String name)
Gets the image icons that is used in PropertyPane. By default it will use IconsFactory to get the image icons.

Subclass can override this method to provide their own icon. The the value of the name parameter will be either "icons/add.png" or "icons/property.png".

Parameters:
name - the icon name
Returns:
the image icon of a name.

getResourceString

protected String getResourceString(String key)
Gets the localized string from resource bundle. Subclass can override it to provide its own string. Available keys are defined in dashboard.properties.

Overrides:
getResourceString in class DocumentPane
Parameters:
key - the resource key.
Returns:
the localized string.

closeAll

public void closeAll()
Description copied from class: DocumentPane
Closes all documents.
This method is Swing thread-safe.

Specified by:
closeAll in interface IDocumentPane
Overrides:
closeAll in class DocumentPane

JIDE 3.5.15