JIDE 3.5.15

com.jidesoft.docking
Class DockableFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.jidesoft.docking.DockableFrame
All Implemented Interfaces:
DockableHolder, Refocusable, TabColorProvider, ImageObserver, MenuContainer, Serializable, Accessible, WindowConstants

public class DockableFrame
extends JComponent
implements Accessible, WindowConstants, Refocusable, DockableHolder, TabColorProvider

A lightweight frame that provides many of the features of a native frame, including dragging, hiding, resizing, title display, and support docking, auto-hiding and floating.

Generally, you add DockableFrames to any JFrame as long as that JFrame implements DockableHolder. The UI delegates the look-and-feel-specific actions to the DockingManager object maintained by the JFrame.

The DockableFrame content pane is where you add child components. So, to create a DockableFrame that has a number of buttons arranged with the content pane's default BorderLayout object, you might do something like this:

    JComponent c = (JComponent) dockableFrame.getContentPane();
    c.add(new JScrollPane(new JTextArea()), BorderLayout.NORTH);
    c.add(new JButton(), BorderLayout.CENTER);
 

See Also:
DockableFrameEvent, DockingManager, Serialized Form

Nested Class Summary
protected  class DockableFrame.AccessibleDockableFrame
          This class implements accessibility support for the DockableFrame class.
 class DockableFrame.AutohideAction
           
 class DockableFrame.CloseAction
           
 class DockableFrame.DockableAction
           
 class DockableFrame.FloatingAction
           
 class DockableFrame.HideAutohideAction
           
 class DockableFrame.MaximizeAction
           
 
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
protected  Action _autohideAction
           
protected  Action _closeAction
           
protected  Action _customDoubleClickAction
           
protected  Action _dockableAction
           
protected  Action _floatingAction
           
protected  PropertyChangeListener _focusChangeListener
           
protected  Action _hideAutohideAction
           
protected  Action _maximizeAction
           
protected  boolean _showContextMenu
           
static int AUTOHIDE_ACTION_TO_REMAIN_ACTIVE
          One of the default autohide actions.
static int BUTTON_ALL
           
static int BUTTON_AUTOHIDE
           
static int BUTTON_CLOSE
          The value of each buttons.
static int BUTTON_FLOATING
           
static int BUTTON_HIDE_AUTOHIDE
           
static int BUTTON_MAXIMIZE
           
static int CLOSE_ACTION_TO_HIDE
          One of the default close actions.
static int CLOSE_ACTION_TO_REMOVE
          One of the default close actions.
static int CLOSE_ACTION_TO_REMOVE_AND_DISPOSE
          One of the default close actions.
static int ESCAPE_ACTION_DO_NOTING
          One of the default escape actions.
static int ESCAPE_ACTION_TO_HIDE
          One of the default escape actions.
static int ESCAPE_ACTION_TO_REMOVE
          One of the default escape actions.
static int ESCAPE_ACTION_TO_YIELD_FOCUS
          One of the default escape actions.
static String PROPERTY_ACTIVE
          Constrained property name indicating that the dockable frame is selected.
static String PROPERTY_ADDITIONAL_BUTTON_ACTIONS
          Constrained property name indicating that the additional buttons currently have.
static String PROPERTY_ADDITONAL_BUTTON_ACTIONS
          Deprecated. 
static String PROPERTY_AUTOHIDABLE
          Constrained property name indicating that the dockable frame can be autohidden.
static String PROPERTY_AUTOHIDE
          Constrained property name indicating that the dockable frame is autohide.
static String PROPERTY_AUTOHIDE_ACTION
           
static String PROPERTY_AUTOHIDE_HEIGHT
           
static String PROPERTY_AUTOHIDE_SHOWING
          Constrained property name indicating that the dockable frame is autohide but showing.
static String PROPERTY_AUTOHIDE_WHEN_ACTIVE
           
static String PROPERTY_AUTOHIDE_WIDTH
           
static String PROPERTY_AVAILABLE
          Bound property name.
static String PROPERTY_AVAILABLE_BUTTONS
          Bound property name.
static String PROPERTY_BUTTONS_ORDER
          Bound property name.
static String PROPERTY_CLOSE_ACTION
           
static String PROPERTY_CONTENT_PANE
          Bound property name.
static String PROPERTY_DEFAULT_AUTOHIDE_ACTION
           
static String PROPERTY_DEFAULT_CLOSE_ACTION
           
static String PROPERTY_DEFAULT_ESCAPE_ACTION
           
static String PROPERTY_DOCKABLE
          Constrained property name indicating that the dockable frame can be docked.
static String PROPERTY_DOCKABLE_ACTION
           
static String PROPERTY_DOCKED
          Constrained property name indicating that the dockable frame is docked.
static String PROPERTY_DOCKED_HEIGHT
           
static String PROPERTY_DOCKED_WIDTH
           
static String PROPERTY_DOUBLE_CLICK_ACTION
           
static String PROPERTY_FLOATABLE
          Constrained property name indicating that the dockable frame is floatable.
static String PROPERTY_FLOATED
          Constrained property name indicating that the dockable frame is floated.
static String PROPERTY_FLOATING_ACTION
           
static String PROPERTY_FRAME_ICON
          Bound property name.
static String PROPERTY_GLASS_PANE
          Bound property name.
static String PROPERTY_HIDABLE
          Constrained property name indicating that the dockable frame can be hided.
static String PROPERTY_HIDDEN
          Constrained property name indicating that the dockable frame is hidden.
static String PROPERTY_HIDE_AUTOHIDE_ACTION
           
static String PROPERTY_INIT_INDEX
           
static String PROPERTY_INIT_MODE
           
static String PROPERTY_INIT_SIDE
           
static String PROPERTY_KEY
          Bound property key.
static String PROPERTY_LAYERED_PANE
          Bound property name.
static String PROPERTY_MAXIMIZABLE
          Constrained property name indicating that the dockable frame can be maximized.
static String PROPERTY_MAXIMIZE_ACTION
           
static String PROPERTY_MAXIMIZED
          Constrained property name indicating that the dockable frame is maximized.
static String PROPERTY_MENU_BAR
          Bound property name.
static String PROPERTY_PREFERRED_AUTOHIDE_SIDE
           
static String PROPERTY_REARRANGABLE
          Constrained property name indicating that the dockable frame can be rearranged.
static String PROPERTY_ROOT_PANE
          Bound property name.
static String PROPERTY_SHOW_CONTENT_PANE
           
static String PROPERTY_SHOW_CONTEXT_MENU
           
static String PROPERTY_SHOW_GRIPPER
          Bound property name for gripper.
static String PROPERTY_SHOW_TITLE_BAR
           
static String PROPERTY_SIDE_DOCK_ALLOWED
           
static String PROPERTY_SIDE_TITLE
          Bound property name.
static String PROPERTY_SLIDING_AUTOHIDE
          Bound property name.
static String PROPERTY_STAY_IN_GROUP
           
static String PROPERTY_TAB_DOCK_ALLOWED
           
static String PROPERTY_TAB_TITLE
          Bound property name.
static String PROPERTY_TITLE
          Bound property name.
static String PROPERTY_TITLE_BAR_COMPONENT
          Bound property name.
static String PROPERTY_TITLE_LABEL_COMPONENT
          Bound property name.
static String PROPERTY_TRANSIENT
          Bound property name.
static String PROPERTY_UNDOCKED_BOUNDS
           
static String PROPERTY_VISIBLE
          Bound property name.
 
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
DockableFrame()
          Create an DockableFramew with empty key and default icon.
DockableFrame(Icon frameIcon)
          Create an DockableFramew with empty key and specified icon.
DockableFrame(String key)
          Create an DockableFramew with key and default icon.
DockableFrame(String key, Icon frameIcon)
          Create an DockableFramew with key and icon.
 
Method Summary
 void addAdditionalButtonActions(Action action)
          Adds an additional button to the title bar.
 void addAdditionalButtonActions(Action action, Icon icon)
          Deprecated. replaced by addAdditionalButtonActions(javax.swing.Action)
 void addDockableFrameListener(DockableFrameListener l)
          Adds the specified listener to receive dockable frame events from this dockable frame.
protected  void addFocusTracker()
           
protected  void addImpl(Component comp, Object constraints, int index)
          Ensures that, by default, children cannot be added directly to this component.
 void addNotify()
          We've been added to the swing hierarchy, so start updating _lastFocusedComponent.
 MouseInputListener createDockableFrameMouseInputListener()
          Create a DockableFrameMouseInputAdapter and return it.
protected  PropertyChangeListener createFocusChangeListener()
           
protected  NotificationFlasher createNotificationFlasher(AutoHideContainer autoHideContainer)
           
protected  NotificationFlasher createNotificationFlasher(FrameContainer fc)
           
protected  JRootPane createRootPane()
          Called by the constructor to set up the JRootPane.
protected  void deinstallMouseHandlers()
          Uninstalls the mouse listener.
 void dispose()
          Clean up references so we can gc this frame and the docking manager.
protected  void fireDockableFrameEvent(int id)
           
protected  void fireDockableFrameEvent(int id, DockableFrame oppositeDockableFrame)
          Fires an dockable frame event.
protected  void fireDockableFrameEvent(int id, DockingManager oppositeDockingManager)
          Fires a dockable frame event.
 AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this DockableFrame.
 Icon getActionIcon(Action action)
          Get icon for the designated action.
 List<Action> getAdditionalButtonActions()
          Returns the additional button actions.
 Action getAutohideAction()
          Gets the action for the autohide button.
 int getAutohideHeight()
          Get the height of the component when it's in auto-hide mode
 com.jidesoft.docking.PreviousState getAutohidePreviousState()
          Get the state before the component switch to auto-hide mode
 int getAutohideWidth()
          Get the width of the component when it's in auto-hide mode
 int getAvailableButtons()
          Gets the buttons that are visible on the title bar of dockable frame.
 com.jidesoft.docking.PreviousState getAvailablePreviousState()
          Gets the state before the component switches between available and unavailable
 int[] getButtonsOrder()
          Gets the buttons order.
 Action getCloseAction()
          Gets the action for the close button.
 com.jidesoft.docking.PreviousState getClosePreviousState()
          Gets the state before the component switch to hidden mode.
 Container getContentPane()
          Returns the content pane for this dockable frame.
 DockContext getContext()
          Get the DockContext used by DockableFrame.
 Action getCustomDoubleClickAction()
          Gets the action for the double click button.
 int getDefaultCloseAction()
          Gets the default action when the close button is clicked on the dockable frame.
 int getDefaultEscapeAction()
          Gets the default action when the escape key is pressed in the dockable frame.
 Component getDefaultFocusComponent()
          Gets the default focus component for the dockable frame.
 Action getDockableAction()
          Gets the action for the dockable button.
 DockableFrameListener[] getDockableFrameListeners()
          Returns an array of all the DockableFrameListeners added to this DockableFrame with addDockableFrameListener.
 int getDockedHeight()
          Get the height when the component is docked inside a JFrame
 int getDockedWidth()
          Get the width when the component is docked inside a JFrame
 int getDockID()
          Get dock id.
 DockingManager getDockingManager()
          Get the docking manager.
 com.jidesoft.docking.PreviousState getDockPreviousState()
          Get the state before the component switch to dock mode
protected  Component getDraggingTarget(MouseEvent e)
           
 Action getFloatingAction()
          Gets the action for the floating button.
 Action getFloatingAction(boolean single)
          Gets the action for the floating button.
 com.jidesoft.docking.PreviousState getFloatPreviousState()
          Get the state before the component switch to floating mode
 Component getFocusedComponent()
          Gets the subcomponent of the dockable frame which holds focus.
protected  Component getFocusOwner()
          If this DockableFrame is active, returns the child that has focus.
 Icon getFrameIcon()
          Returns the image displayed in the title bar of this dockable frame(usually in the top-left corner).
 Component getGlassPane()
          Returns the glass pane for this dockable frame.
 com.jidesoft.docking.PreviousState getHiddenPreviousState()
          Gets the state before the component switches to hidden mode
 Action getHideAutohideAction()
           
 int getInitIndex()
          Gets the init index.
 int getInitMode()
          Gets initial state.
 int getInitSide()
          Gets the initial side.
 JMenuBar getJMenuBar()
          Returns the current JMenuBar for this DockableFrame, or null if no menu bar has been set.
 String getKey()
          Returns the key of the DockableFrame.
 JLayeredPane getLayeredPane()
          Returns the layered pane for this dockable frame.
 Action getMaximizeAction()
          Gets the action for the maximize button.
 com.jidesoft.docking.PreviousState getMaximizedPreviousState()
          Gets the state before the component switches between maximized and restore
 int getPreferredAutohideSide()
          Gets preferred autohide side.
protected  String getResourceString(String key)
          Gets the resource string used in DockableFrame.
 JRootPane getRootPane()
          Returns the rootPane object for this dockable frame.
 String getSideTitle()
          Returns the side title of the DockableFrame.
 Color getTabBackground()
          Gets the background color the tab.
 Color getTabForeground()
          Gets the foreground color the tab.
 String getTabTitle()
          Returns the tab title of the DockableFrame.
 String getTitle()
          Returns the title of the DockableFrame.
 JComponent getTitleBarComponent()
          Gets the component which is part of dockable frame's title bar.
 JComponent getTitleLabelComponent()
          Gets the component which is used to replace the default title.
 DockableFrameUI getUI()
          Returns the look-and-feel object that renders this component.
 String getUIClassID()
          Returns the name of the look-and-feel class that renders this component.
 Rectangle getUndockedBounds()
          Get the un-restricted bounds.
protected  void installMouseHandlers()
          Install mouse listener to title bar of DockableFrame.
 boolean isActivateAfterSliding()
          Deprecated. This was for internal eventing and is no longer needed.
 boolean isActive()
          Gets if the dockable frame is active.
 boolean isAlwaysStayInGroup()
          Checks if the frame is always tabbed with a group.
 boolean isAutohidable()
          Returns whether the DockableFrame can be autohidable by some user action.
 boolean isAutohide()
          Returns whether the DockableFrame is currently autohidden.
 boolean isAutohideShowing()
          Returns whether the DockableFrame is currently in autohide mode and is visible.
 boolean isAutohideWhenActive()
          Checks if the dockable frame will autohide even when the frame is active.
 boolean isAvailable()
          Checks if the frame is available.
 boolean isDockable()
          Returns whether the DockableFrame can be docked by some user action.
 boolean isDocked()
          Returns whether the DockableFrame is currently docked.
protected  boolean isDraggingTarget(MouseEvent e)
          Checks if the mouse event is a valid dragging event.
 boolean isFloatable()
          Gets the floatable property, which by default is false.
 boolean isFloated()
          Returns whether the DockableFrame is currently floating.
 boolean isHidable()
          Returns whether this DockableFrame can be closed by some user action.
 boolean isHidden()
          Returns whether this DockableFrame is currently hidden.
 boolean isMaximizable()
           
 boolean isMaximized()
          Gets if the dockable frame is maximized.
 boolean isNotified()
          Checks if the dockable frame is in notified mode.
 boolean isOpaque()
          Returns true if this component is completely opaque.
 boolean isRearrangable()
          Returns whether the DockableFrame can be docked by some user action.
protected  boolean isRootPaneCheckingEnabled()
          Returns whether calls to add and setLayout cause an exception to be thrown.
 boolean isShowContentPane()
          Checks if the content pane is visible.
 boolean isShowContextMenu()
          Checks if the context menu should be shown.
 boolean isShowGripper()
          Checks if the gripper is visible.
 boolean isShowTitleBar()
          Checks if the title bar is visible.
 boolean isSideDockAllowed()
          Checks if side dock is allowed.
 boolean isSlidingAutohide()
          This is a flag to determine the displaying behavior of a dockable frame when it is in autohidden mode.
 boolean isTabDockAllowed()
          Checks if tab dock is allowed.
 boolean isTransient()
          Checks if the dockable frame is transient.
protected  String paramString()
           
 void remove(Component comp)
          Removes the specified component from this container.
 void removeAdditionalButtonActions(Action action)
          Removes an addtional button from the title bar.
 void removeDockableFrameListener(DockableFrameListener l)
          Removes the specified dockable frame listener so that it no longer receives dockable frame events from this dockable frame.
 void removeNotify()
          We've been removed from the swing hierarchy, so stop updating _lastFocusedComponent.
 boolean requestFocusInInternalWindow()
          Set the last focused component toT focus.
 void resetDockID()
          Resets dock id.
 void saveAutohidePreviousState()
          Save current state as autohide previous state.
 void saveAvailablePreviousState()
          Save current state as available previous state.
 void saveClosePreviousState()
          Save current state as close previous state.
 void saveDockPreviousState()
          Save current state as dock previous state.
 void saveFloatPreviousState()
          Save current state as float previous state.
 void saveHiddenPreviousState()
          Save current state as hidden previous state.
 void saveMaximizedPreviousState()
          Save current state as maximized previous state.
 void setActive(boolean active)
          Set the active property and activate the dockable frame.
 void setAlwaysStayInGroup(boolean alwaysStayInGroup)
          Ses the always stay in group flag.
 void setAutohidable(boolean b)
          Sets whether the DockableFrame can be resized by some user action.
protected  void setAutohide(boolean b)
          Sets this frame to auto-hide state.
 void setAutohideAction(Action autohideAction)
          Sets the action for the autohide button.
 void setAutohideHeight(int autohideHeight)
          Set the height when the component is auto-hide
 void setAutohidePreviousState(com.jidesoft.docking.PreviousState state)
          Save the state before the component switch to auto-hide mode
protected  void setAutohideShowing(boolean b)
          Sets this frame to auto-hide-showing state.
 void setAutohideWhenActive(boolean autohideWhenActive)
          Set the autohideWhenActive flag.
 void setAutohideWidth(int w)
          Set the width when the component is auto-hide
 void setAvailable(boolean available)
          Sets true to make the frame available.
 void setAvailableButtons(int availableButtons)
          Sets the visibilities of each buttons on the title bar of dockable frame.
 void setAvailablePreviousState(com.jidesoft.docking.PreviousState state)
          Sets the state before the component switches between available and unavailable.
 void setButtonsOrder(int[] buttonsOrder)
          Sets the buttons order.
 void setCloseAction(Action closeAction)
          Sets the action for the close button.
 void setClosePreviousState(com.jidesoft.docking.PreviousState state)
          Sets the state before the component before main JFrame is closed.
 void setContentPane(Container c)
          Sets this DockableFrame's contentPane property.
 void setContext(DockContext context)
          Sets the dock context.
 void setCustomDoubleClickAction(Action customDoubleClickAction)
          Sets the action for the double click on the title pane.
 void setDefaultCloseAction(int defaultCloseAction)
          Sets the default action when the close button is clicked on the dockable frame.
 void setDefaultEscapeAction(int defaultEscapeAction)
          Sets the default action when the escape key is pressed in the dockable frame.
 void setDefaultFocusComponent(Component defaultFocusComponent)
          Sets the default focus component for the dockable frame.
 void setDockable(boolean b)
          Sets whether the DockableFrame can be docked by some user action.
 void setDockableAction(Action dockableAction)
          Sets the action for the dockable button.
protected  void setDocked(boolean b)
          Sets this frame to dock state.
 void setDockedHeight(int dockedHeight)
          Set the height when the component is docked inside a JFrame
 void setDockedWidth(int dockedWidth)
          Set the width of docked state.
 void setDockID(int id)
          Sets dock id.
 void setDockingManager(DockingManager dockingManager)
          Set the docking manager for dockable frame.
 void setDockPreviousState(com.jidesoft.docking.PreviousState state)
          Save the state before the component switch to dock mode
 void setFloatable(boolean b)
          Sets the floatable property, which must be true for the user to be able to make the DockableFrame floated.
protected  void setFloated(boolean b)
          Sets this frame to float state.
 void setFloatingAction(Action floatingAction)
          Sets the action for the floating button.
 void setFloatPreviousState(com.jidesoft.docking.PreviousState state)
          Save the state before the component switch to floating mode
 void setFrameIcon(Icon icon)
          Sets an image to be displayed in the titlebar of this dockable frame (usually in the top-left corner) or tab icon if the dockable frame is tabbed with other frames.
 void setGlassPane(Component glass)
          Sets this DockableFrame's glassPane property.
 void setHidable(boolean b)
          Sets whether this DockableFrame can be hidden by some user action.
 void setHidden(boolean b)
          Sets the internal state of dockable frame to STATE_HIDDEN if the argument is true.
 void setHiddenPreviousState(com.jidesoft.docking.PreviousState state)
          Sets the state before the component switches to hidden mode.
 void setHideAutohideAction(Action hideAutohideAction)
          Sets the action for the hide autohide button.
 void setInitIndex(int initIndex)
          Sets initial index.
 void setInitMode(int initMode)
          Sets the initial state.
 void setInitSide(int initSide)
          Sets the initial side.
 void setJMenuBar(JMenuBar m)
          Sets the menuBar property for this DockableFrame.
 void setKey(String key)
          Sets the key of the DockableFrame.
 void setLastFocusedComponent(Component lastFocusedComponent)
          Sets the subcomponent of the dockable frame which currently has focus.
 void setLayeredPane(JLayeredPane layered)
          Sets this DockableFrame's layeredPane property.
 void setLayout(LayoutManager manager)
          Ensures that, by default, the layout of this component cannot be set.
 void setMaximizable(boolean maximizable)
           
 void setMaximizeAction(Action maximizeAction)
          Sets the action for the maximize button.
 void setMaximized(boolean maximized)
          Set the maximized property and activate the dockable frame.
 void setMaximizedPreviousState(com.jidesoft.docking.PreviousState state)
          Sets the state before the component switches between maximized and restore.
 void setNotified(boolean notified)
          Sets the notified mode.
 void setPreferredAutohideSide(int preferredAutohideSide)
          Sets preferred autohide side.
 void setPreferredSize(Dimension preferredSize)
           
 void setRearrangable(boolean b)
          Sets whether the DockableFrame can be docked by some user action.
protected  void setRootPane(JRootPane root)
          Sets the rootPane property for this DockableFrame.
protected  void setRootPaneCheckingEnabled(boolean enabled)
          Determines whether calls to add and setLayout cause an exception to be thrown.
 void setShowContentPane(boolean showContentPane)
          Sets the visibility of the content pane.
 void setShowContextMenu(boolean showContextMenu)
          Sets the flag to show context menu or not.
 void setShowGripper(boolean showGripper)
          Sets the visibility of gripper.
 void setShowTitleBar(boolean showTitleBar)
          Sets the visibility of the title bar.
 void setSideDockAllowed(boolean sideDockAllowed)
          Sets the side dock allowed flag.
 void setSideTitle(String title)
          Sets the DockableFrame side title.
 void setSlidingAutohide(boolean slidingAutohide)
          Sets the displaying behavior of a dockable frame when it is in autohidden mode.
 void setTabBackground(Color background)
          Sets the tab background color of the dockable frame if it's autohidden or docked in a FrameContainer with multiple dockable frames.
 void setTabDockAllowed(boolean tabDockAllowed)
          Sets tab dock allowed flag.
 void setTabForeground(Color foreground)
          Sets the tab foreground color of the dockable frame if it's autohidden or docked in a FrameContainer with multiple dockable frames.
 void setTabTitle(String title)
          Sets the DockableFrame tab title.
 void setTitle(String title)
          Sets the DockableFrame title.
 void setTitleBarComponent(JComponent component)
          Sets a component which is part of the dockable frame's title bar.
 void setTitleLabelComponent(JComponent component)
          Sets a component which will be used to replace the default title.
 void setTransient(boolean isTransient)
          Sets if the dockable frame is transient.
 void setUI(DockableFrameUI ui)
          Sets the UI delegate for this DockableFrame.
 void setUndockedBounds(Rectangle undockedBounds)
          Set the un-restricted bounds.
 void setVisible(boolean aFlag)
          Makes the component visible or invisible.
protected  boolean shouldNotify(FrameContainer frameContainer)
          Checks if the frame should be notified.
 boolean shouldVetoHiding()
          Checks if the frame can be hidden.
 boolean shouldVetoRemoving()
          Checks if the frame can be removed.
 boolean shouldVetoShowing()
          Checks if the frame can be shown while loading layout files.
 void updateUI()
          Notification from the UIManager that the look and feel has changed.
 
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, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, 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, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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

PROPERTY_CONTENT_PANE

public static final String PROPERTY_CONTENT_PANE
Bound property name.

See Also:
Constant Field Values

PROPERTY_MENU_BAR

public static final String PROPERTY_MENU_BAR
Bound property name.

See Also:
Constant Field Values

PROPERTY_TAB_TITLE

public static final String PROPERTY_TAB_TITLE
Bound property name.

See Also:
Constant Field Values

PROPERTY_SIDE_TITLE

public static final String PROPERTY_SIDE_TITLE
Bound property name.

See Also:
Constant Field Values

PROPERTY_TITLE

public static final String PROPERTY_TITLE
Bound property name.

See Also:
Constant Field Values

PROPERTY_KEY

public static final String PROPERTY_KEY
Bound property key.

See Also:
Constant Field Values

PROPERTY_LAYERED_PANE

public static final String PROPERTY_LAYERED_PANE
Bound property name.

See Also:
Constant Field Values

PROPERTY_ROOT_PANE

public static final String PROPERTY_ROOT_PANE
Bound property name.

See Also:
Constant Field Values

PROPERTY_GLASS_PANE

public static final String PROPERTY_GLASS_PANE
Bound property name.

See Also:
Constant Field Values

PROPERTY_FRAME_ICON

public static final String PROPERTY_FRAME_ICON
Bound property name.

See Also:
Constant Field Values

PROPERTY_AVAILABLE_BUTTONS

public static final String PROPERTY_AVAILABLE_BUTTONS
Bound property name.

See Also:
Constant Field Values

PROPERTY_BUTTONS_ORDER

public static final String PROPERTY_BUTTONS_ORDER
Bound property name.

See Also:
Constant Field Values

PROPERTY_TITLE_BAR_COMPONENT

public static final String PROPERTY_TITLE_BAR_COMPONENT
Bound property name.

See Also:
Constant Field Values

PROPERTY_TITLE_LABEL_COMPONENT

public static final String PROPERTY_TITLE_LABEL_COMPONENT
Bound property name.

See Also:
Constant Field Values

PROPERTY_VISIBLE

public static final String PROPERTY_VISIBLE
Bound property name.

See Also:
Constant Field Values

PROPERTY_AVAILABLE

public static final String PROPERTY_AVAILABLE
Bound property name.

See Also:
Constant Field Values

PROPERTY_SLIDING_AUTOHIDE

public static final String PROPERTY_SLIDING_AUTOHIDE
Bound property name.

See Also:
Constant Field Values

PROPERTY_TRANSIENT

public static final String PROPERTY_TRANSIENT
Bound property name.

See Also:
Constant Field Values

PROPERTY_FLOATABLE

public static final String PROPERTY_FLOATABLE
Constrained property name indicating that the dockable frame is floatable.

See Also:
Constant Field Values

PROPERTY_HIDABLE

public static final String PROPERTY_HIDABLE
Constrained property name indicating that the dockable frame can be hided.

See Also:
Constant Field Values

PROPERTY_DOCKABLE

public static final String PROPERTY_DOCKABLE
Constrained property name indicating that the dockable frame can be docked.

See Also:
Constant Field Values

PROPERTY_AUTOHIDABLE

public static final String PROPERTY_AUTOHIDABLE
Constrained property name indicating that the dockable frame can be autohidden.

See Also:
Constant Field Values

PROPERTY_MAXIMIZABLE

public static final String PROPERTY_MAXIMIZABLE
Constrained property name indicating that the dockable frame can be maximized.

See Also:
Constant Field Values

PROPERTY_REARRANGABLE

public static final String PROPERTY_REARRANGABLE
Constrained property name indicating that the dockable frame can be rearranged.

See Also:
Constant Field Values

PROPERTY_ACTIVE

public static final String PROPERTY_ACTIVE
Constrained property name indicating that the dockable frame is selected.

See Also:
Constant Field Values

PROPERTY_MAXIMIZED

public static final String PROPERTY_MAXIMIZED
Constrained property name indicating that the dockable frame is maximized.

See Also:
Constant Field Values

PROPERTY_HIDDEN

public static final String PROPERTY_HIDDEN
Constrained property name indicating that the dockable frame is hidden.

See Also:
Constant Field Values

PROPERTY_DOCKED

public static final String PROPERTY_DOCKED
Constrained property name indicating that the dockable frame is docked.

See Also:
Constant Field Values

PROPERTY_FLOATED

public static final String PROPERTY_FLOATED
Constrained property name indicating that the dockable frame is floated.

See Also:
Constant Field Values

PROPERTY_AUTOHIDE

public static final String PROPERTY_AUTOHIDE
Constrained property name indicating that the dockable frame is autohide.

See Also:
Constant Field Values

PROPERTY_AUTOHIDE_SHOWING

public static final String PROPERTY_AUTOHIDE_SHOWING
Constrained property name indicating that the dockable frame is autohide but showing.

See Also:
Constant Field Values

PROPERTY_TAB_DOCK_ALLOWED

public static final String PROPERTY_TAB_DOCK_ALLOWED
See Also:
Constant Field Values

PROPERTY_SIDE_DOCK_ALLOWED

public static final String PROPERTY_SIDE_DOCK_ALLOWED
See Also:
Constant Field Values

PROPERTY_STAY_IN_GROUP

public static final String PROPERTY_STAY_IN_GROUP
See Also:
Constant Field Values

PROPERTY_SHOW_GRIPPER

public static final String PROPERTY_SHOW_GRIPPER
Bound property name for gripper.

See Also:
Constant Field Values

PROPERTY_SHOW_TITLE_BAR

public static final String PROPERTY_SHOW_TITLE_BAR
See Also:
Constant Field Values

PROPERTY_SHOW_CONTENT_PANE

public static final String PROPERTY_SHOW_CONTENT_PANE
See Also:
Constant Field Values

PROPERTY_SHOW_CONTEXT_MENU

public static final String PROPERTY_SHOW_CONTEXT_MENU
See Also:
Constant Field Values

PROPERTY_INIT_SIDE

public static final String PROPERTY_INIT_SIDE
See Also:
Constant Field Values

PROPERTY_INIT_MODE

public static final String PROPERTY_INIT_MODE
See Also:
Constant Field Values

PROPERTY_INIT_INDEX

public static final String PROPERTY_INIT_INDEX
See Also:
Constant Field Values

PROPERTY_DOCKED_WIDTH

public static final String PROPERTY_DOCKED_WIDTH
See Also:
Constant Field Values

PROPERTY_DOCKED_HEIGHT

public static final String PROPERTY_DOCKED_HEIGHT
See Also:
Constant Field Values

PROPERTY_AUTOHIDE_WIDTH

public static final String PROPERTY_AUTOHIDE_WIDTH
See Also:
Constant Field Values

PROPERTY_AUTOHIDE_HEIGHT

public static final String PROPERTY_AUTOHIDE_HEIGHT
See Also:
Constant Field Values

PROPERTY_UNDOCKED_BOUNDS

public static final String PROPERTY_UNDOCKED_BOUNDS
See Also:
Constant Field Values

PROPERTY_PREFERRED_AUTOHIDE_SIDE

public static final String PROPERTY_PREFERRED_AUTOHIDE_SIDE
See Also:
Constant Field Values

PROPERTY_CLOSE_ACTION

public static final String PROPERTY_CLOSE_ACTION
See Also:
Constant Field Values

PROPERTY_AUTOHIDE_ACTION

public static final String PROPERTY_AUTOHIDE_ACTION
See Also:
Constant Field Values

PROPERTY_HIDE_AUTOHIDE_ACTION

public static final String PROPERTY_HIDE_AUTOHIDE_ACTION
See Also:
Constant Field Values

PROPERTY_FLOATING_ACTION

public static final String PROPERTY_FLOATING_ACTION
See Also:
Constant Field Values

PROPERTY_MAXIMIZE_ACTION

public static final String PROPERTY_MAXIMIZE_ACTION
See Also:
Constant Field Values

PROPERTY_DOCKABLE_ACTION

public static final String PROPERTY_DOCKABLE_ACTION
See Also:
Constant Field Values

PROPERTY_DOUBLE_CLICK_ACTION

public static final String PROPERTY_DOUBLE_CLICK_ACTION
See Also:
Constant Field Values

PROPERTY_DEFAULT_CLOSE_ACTION

public static final String PROPERTY_DEFAULT_CLOSE_ACTION
See Also:
Constant Field Values

PROPERTY_DEFAULT_AUTOHIDE_ACTION

public static final String PROPERTY_DEFAULT_AUTOHIDE_ACTION
See Also:
Constant Field Values

PROPERTY_DEFAULT_ESCAPE_ACTION

public static final String PROPERTY_DEFAULT_ESCAPE_ACTION
See Also:
Constant Field Values

PROPERTY_AUTOHIDE_WHEN_ACTIVE

public static final String PROPERTY_AUTOHIDE_WHEN_ACTIVE
See Also:
Constant Field Values

PROPERTY_ADDITONAL_BUTTON_ACTIONS

@Deprecated
public static final String PROPERTY_ADDITONAL_BUTTON_ACTIONS
Deprecated. 
Has typo, to be replaced by PROPERTY_ADDITIONAL_BUTTON_ACTIONS

See Also:
Constant Field Values

PROPERTY_ADDITIONAL_BUTTON_ACTIONS

public static final String PROPERTY_ADDITIONAL_BUTTON_ACTIONS
Constrained property name indicating that the additional buttons currently have.

See Also:
Constant Field Values

BUTTON_CLOSE

public static final int BUTTON_CLOSE
The value of each buttons. It's a bit wise OR to combine them together if several buttons are visible.

See Also:
Constant Field Values

BUTTON_HIDE_AUTOHIDE

public static final int BUTTON_HIDE_AUTOHIDE
See Also:
Constant Field Values

BUTTON_AUTOHIDE

public static final int BUTTON_AUTOHIDE
See Also:
Constant Field Values

BUTTON_FLOATING

public static final int BUTTON_FLOATING
See Also:
Constant Field Values

BUTTON_MAXIMIZE

public static final int BUTTON_MAXIMIZE
See Also:
Constant Field Values

BUTTON_ALL

public static final int BUTTON_ALL
See Also:
Constant Field Values

_focusChangeListener

protected PropertyChangeListener _focusChangeListener

_closeAction

protected Action _closeAction

_hideAutohideAction

protected Action _hideAutohideAction

_floatingAction

protected Action _floatingAction

_autohideAction

protected Action _autohideAction

_maximizeAction

protected Action _maximizeAction

_dockableAction

protected Action _dockableAction

_customDoubleClickAction

protected Action _customDoubleClickAction

_showContextMenu

protected boolean _showContextMenu

CLOSE_ACTION_TO_HIDE

public static final int CLOSE_ACTION_TO_HIDE
One of the default close actions. If the close button key is pressed, the dockable frame will be hidden.

See Also:
Constant Field Values

CLOSE_ACTION_TO_REMOVE

public static final int CLOSE_ACTION_TO_REMOVE
One of the default close actions. If the close button key is pressed, the dockable frame will be removed from the docking manager.

See Also:
Constant Field Values

CLOSE_ACTION_TO_REMOVE_AND_DISPOSE

public static final int CLOSE_ACTION_TO_REMOVE_AND_DISPOSE
One of the default close actions. If this close button key is pressed, the dockable frame will, hide, remove itself and then call dispose.

See Also:
Constant Field Values

AUTOHIDE_ACTION_TO_REMAIN_ACTIVE

public static final int AUTOHIDE_ACTION_TO_REMAIN_ACTIVE
One of the default autohide actions. If the autohide button key is pressed, the frame will remain active.

See Also:
Constant Field Values

ESCAPE_ACTION_TO_YIELD_FOCUS

public static final int ESCAPE_ACTION_TO_YIELD_FOCUS
One of the default escape actions. If the escape key is pressed, the focus will be transferred to DockingManager#getEscapeKeyTargetComponent in this case.

See Also:
Constant Field Values

ESCAPE_ACTION_DO_NOTING

public static final int ESCAPE_ACTION_DO_NOTING
One of the default escape actions. If the escape key is pressed, nothing will happen.

See Also:
Constant Field Values

ESCAPE_ACTION_TO_HIDE

public static final int ESCAPE_ACTION_TO_HIDE
One of the default escape actions. If the escape key is pressed, the dockable frame will be hidden and the focus will be transferred to DockingManager#getEscapeKeyTargetComponent in this case.

See Also:
Constant Field Values

ESCAPE_ACTION_TO_REMOVE

public static final int ESCAPE_ACTION_TO_REMOVE
One of the default escape actions. If the escape key is pressed, the dockable frame will be removed from the docking manager and the focus will be transferred to DockingManager#getEscapeKeyTargetComponent in this case.

See Also:
Constant Field Values
Constructor Detail

DockableFrame

public DockableFrame()
Create an DockableFramew with empty key and default icon. Please note, you must call setKey() to set a key before adding it to DockingManager.


DockableFrame

public DockableFrame(String key)
Create an DockableFramew with key and default icon.

Parameters:
key - key of the dockable frame

DockableFrame

public DockableFrame(Icon frameIcon)
Create an DockableFramew with empty key and specified icon. Please note, you must call setKey() to set a key before adding it to DockingManager.

Parameters:
frameIcon - icon of the dockable frame

DockableFrame

public DockableFrame(String key,
                     Icon frameIcon)
Create an DockableFramew with key and icon.

Parameters:
key - key of the dockable frame
frameIcon - icon of the dockable frame
Method Detail

getResourceString

protected String getResourceString(String key)
Gets the resource string used in DockableFrame. Subclass can override it to provide their own strings.

Parameters:
key - the resource key
Returns:
the localized string.
Since:
3.5.0

addFocusTracker

protected void addFocusTracker()

isOpaque

public boolean isOpaque()
Returns true if this component is completely opaque.

An opaque component paints every pixel within its rectangular bounds. A non-opaque component paints only a subset of its pixels or none at all, allowing the pixels underneath it to "show through". Therefore, a component that does not fully paint its pixels provides a degree of transparency.

Subclasses that guarantee to always completely paint their contents should override this method and return true.

Overrides:
isOpaque in class JComponent
Returns:
true if this component is completely opaque
See Also:
JComponent.setOpaque(boolean)

createDockableFrameMouseInputListener

public MouseInputListener createDockableFrameMouseInputListener()
Create a DockableFrameMouseInputAdapter and return it.

Returns:
a MouseInputAdapter that can handle mouse input in DockableFrame.

deinstallMouseHandlers

protected void deinstallMouseHandlers()
Uninstalls the mouse listener.


installMouseHandlers

protected void installMouseHandlers()
Install mouse listener to title bar of DockableFrame.


createRootPane

protected JRootPane createRootPane()
Called by the constructor to set up the JRootPane.

Returns:
a new JRootPane
See Also:
JRootPane

getUI

public DockableFrameUI getUI()
Returns the look-and-feel object that renders this component.

Returns:
the DockableFrameUI object that renders this component

setUI

public void setUI(DockableFrameUI ui)
Sets the UI delegate for this DockableFrame.

Parameters:
ui - the UI delegate

updateUI

public void updateUI()
Notification from the UIManager that the look and feel has changed. Replaces the current UI object with the latest version from the UIManager.

Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the look-and-feel class that renders this component.

Overrides:
getUIClassID in class JComponent
Returns:
the string "DockableFrameUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

isRootPaneCheckingEnabled

protected boolean isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout cause an exception to be thrown.

Returns:
true if add and setLayout are checked
See Also:
addImpl(java.awt.Component, java.lang.Object, int), setLayout(java.awt.LayoutManager), setRootPaneCheckingEnabled(boolean)

setRootPaneCheckingEnabled

protected void setRootPaneCheckingEnabled(boolean enabled)
Determines whether calls to add and setLayout cause an exception to be thrown.

Parameters:
enabled - a boolean value, true if checking is to be enabled, which cause the exceptions to be thrown
See Also:
addImpl(java.awt.Component, java.lang.Object, int), setLayout(java.awt.LayoutManager), isRootPaneCheckingEnabled()

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Ensures that, by default, children cannot be added directly to this component. Instead, children must be added to its content pane. For example:
 thisComponent.getContentPane().add(child)
 
An attempt to add to directly to this component will cause a runtime exception to be thrown. Subclasses can disable this behavior.

Overrides:
addImpl in class Container
Parameters:
comp - the Component to be added
constraints - the object containing the constraints, if any
index - the index
Throws:
Error - if called with isRootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

remove

public void remove(Component comp)
Removes the specified component from this container.

Overrides:
remove in class Container
Parameters:
comp - the component to be removed
See Also:
Container.add(java.awt.Component)

setLayout

public void setLayout(LayoutManager manager)
Ensures that, by default, the layout of this component cannot be set. Instead, the layout of its content pane should be set. For example:
 thisComponent.getContentPane().setLayout(new GridLayout(1,2))
 
An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.

Overrides:
setLayout in class Container
Parameters:
manager - the LayoutManager
Throws:
Error - if called with isRootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

getJMenuBar

public JMenuBar getJMenuBar()
Returns the current JMenuBar for this DockableFrame, or null if no menu bar has been set.

Returns:
the JMenuBar used by this dockable frame
See Also:
setJMenuBar(javax.swing.JMenuBar)

setJMenuBar

public void setJMenuBar(JMenuBar m)
Sets the menuBar property for this DockableFrame.

Parameters:
m - the JMenuBar to use in this dockable frame
See Also:
getJMenuBar()

getContentPane

public Container getContentPane()
Returns the content pane for this dockable frame.

Returns:
the content pane

setContentPane

public void setContentPane(Container c)
Sets this DockableFrame's contentPane property.

Parameters:
c - the content pane for this dockable frame
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
RootPaneContainer.getContentPane()

getLayeredPane

public JLayeredPane getLayeredPane()
Returns the layered pane for this dockable frame.

Returns:
a JLayeredPane object
See Also:
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane), RootPaneContainer.getLayeredPane()

setLayeredPane

public void setLayeredPane(JLayeredPane layered)
Sets this DockableFrame's layeredPane property.

Parameters:
layered - the JLayeredPane for this dockable frame
Throws:
IllegalComponentStateException - (a runtime exception) if the layered pane parameter is null
See Also:
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)

getGlassPane

public Component getGlassPane()
Returns the glass pane for this dockable frame.

Returns:
the glass pane
See Also:
RootPaneContainer.setGlassPane(java.awt.Component)

setGlassPane

public void setGlassPane(Component glass)
Sets this DockableFrame's glassPane property.

Parameters:
glass - the glass pane for this dockable frame
See Also:
RootPaneContainer.getGlassPane()

getRootPane

public JRootPane getRootPane()
Returns the rootPane object for this dockable frame.

Overrides:
getRootPane in class JComponent
Returns:
the rootPane property
See Also:
RootPaneContainer.getRootPane()

setRootPane

protected void setRootPane(JRootPane root)
Sets the rootPane property for this DockableFrame. This method is called by the constructor.

Parameters:
root - the new JRootPane object

getAvailableButtons

public int getAvailableButtons()
Gets the buttons that are visible on the title bar of dockable frame.

Returns:
the visibilities of each buttons. It's a bit wise OR of values specified at BUTTON_XXX.

setAvailableButtons

public void setAvailableButtons(int availableButtons)
Sets the visibilities of each buttons on the title bar of dockable frame.

Please be noted that this method does not take effect for Aqua L&F.

Parameters:
availableButtons - the visibilities of each buttons. It's a bit wise OR of values specified at BUTTON_XXX.

setHidable

public void setHidable(boolean b)
Sets whether this DockableFrame can be hidden by some user action.

Parameters:
b - a boolean value, where true means this dockable frame can be closed

isHidable

public boolean isHidable()
Returns whether this DockableFrame can be closed by some user action.

Returns:
true if this dockable frame can be closed

isHidden

public boolean isHidden()
Returns whether this DockableFrame is currently hidden.

Returns:
true if this _dockable frame is hidden, false otherwise

setHidden

public void setHidden(boolean b)
               throws PropertyVetoException
Sets the internal state of dockable frame to STATE_HIDDEN if the argument is true. It will fire property change event on PROPERTY_HIDDEN.

Parameters:
b - can be true or false<.code>
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the DockableFrame
See Also:
isHidden()

setDockable

public void setDockable(boolean b)
Sets whether the DockableFrame can be docked by some user action.

Parameters:
b - a boolean, where true means this dockable frame can be docked

isDockable

public boolean isDockable()
Returns whether the DockableFrame can be docked by some user action.

Returns:
true if this dockable frame can be dockable, false otherwise

setAutohidable

public void setAutohidable(boolean b)
Sets whether the DockableFrame can be resized by some user action.

Parameters:
b - a boolean, where true means this dockable frame can be resized

isAutohidable

public boolean isAutohidable()
Returns whether the DockableFrame can be autohidable by some user action.

Returns:
true if this dockable frame can be autohidable, false otherwise

setFloatable

public void setFloatable(boolean b)
Sets the floatable property, which must be true for the user to be able to make the DockableFrame floated.

Parameters:
b - a boolean, where true means this dockable frame can be floated

isFloatable

public boolean isFloatable()
Gets the floatable property, which by default is false.

Returns:
the value of the floatable property.
See Also:
setFloatable(boolean)

setRearrangable

public void setRearrangable(boolean b)
Sets whether the DockableFrame can be docked by some user action.

Parameters:
b - a boolean, where true means this dockable frame can be docked

isRearrangable

public boolean isRearrangable()
Returns whether the DockableFrame can be docked by some user action.

Returns:
true if this dockable frame can be dockable, false otherwise

isFloated

public boolean isFloated()
Returns whether the DockableFrame is currently floating.

Returns:
true if this dockable frame is floating

isDocked

public boolean isDocked()
Returns whether the DockableFrame is currently docked.

Returns:
true if this dockable frame is docked, false otherwise

setDocked

protected void setDocked(boolean b)
                  throws PropertyVetoException
Sets this frame to dock state.

Parameters:
b - Always pass in true.
Throws:
PropertyVetoException - if the property change is vetoed.

setFloated

protected void setFloated(boolean b)
                   throws PropertyVetoException
Sets this frame to float state.

Parameters:
b - Always pass in true.
Throws:
PropertyVetoException - if the property change is vetoed.

setAutohide

protected void setAutohide(boolean b)
                    throws PropertyVetoException
Sets this frame to auto-hide state.

Parameters:
b - Always pass in true.
Throws:
PropertyVetoException - if the property change is vetoed.

setAutohideShowing

protected void setAutohideShowing(boolean b)
                           throws PropertyVetoException
Sets this frame to auto-hide-showing state.

Parameters:
b - Always pass in true.
Throws:
PropertyVetoException - if the property change is vetoed.

setKey

public void setKey(String key)
Sets the key of the DockableFrame. The key is used to uniquely identify a dockable frame in one DockingManager. If this dockable frame has been added to DockingManager and you try to set a key that has been used, IllegalArgumentException will be thrown.

Parameters:
key - a String containing this dockable frame's key

getKey

public String getKey()
Returns the key of the DockableFrame. The key is used to uniquely identify a dockable frame in one DockingManager. The key is not displayed anywhere in the user interface so it is OK to be a non-localized string. The strings for tabTitle, sideTitle, and title should be localized.

Returns:
a String containing this dockable frame's key

getTabTitle

public String getTabTitle()
Returns the tab title of the DockableFrame. Tab title is displayed on the tab when the dockable frame is docked in a tabbed pane. If tab title is never set, the key will be used by default.

Returns:
a String containing this dockable frame's tab title.
See Also:
setTabTitle(java.lang.String)

setTabTitle

public void setTabTitle(String title)
Sets the DockableFrame tab title.

Parameters:
title - the String to display on the tab.
See Also:
getTabTitle()

getSideTitle

public String getSideTitle()
Returns the side title of the DockableFrame. Side title is displayed on the side pane's tab when the dockable frame is in autohide mode. If side title is never set, the tabTitle will be used by default. If tabTitle is never set either, key will be used.

Returns:
a String containing this dockable frame's side title.
See Also:
setSideTitle(java.lang.String)

setSideTitle

public void setSideTitle(String title)
Sets the DockableFrame side title.

Parameters:
title - the String to display on the side pane.
See Also:
getSideTitle()

getTitle

public String getTitle()
Returns the title of the DockableFrame. Title is displayed on the title bar of dockable frame. As it is displayed on title bar, it could be a longer string than tabTitle. It is also used as the tooltip of the tab in tabbed pane. If title is never set, the tabTitle will be used by default. If tabTitle is never set either, key will be used.

Returns:
a String containing this dockable frame's title bar.
See Also:
setTitle(String)

setTitle

public void setTitle(String title)
Sets the DockableFrame title.

Parameters:
title - the String to display in the title bar.

isAutohide

public boolean isAutohide()
Returns whether the DockableFrame is currently autohidden.

Returns:
true if this dockable frame is currently autohidden.

isAutohideShowing

public boolean isAutohideShowing()
Returns whether the DockableFrame is currently in autohide mode and is visible.

Returns:
true if this dockable frame is currently in autohide mode and is visible.

setFrameIcon

public void setFrameIcon(Icon icon)
Sets an image to be displayed in the titlebar of this dockable frame (usually in the top-left corner) or tab icon if the dockable frame is tabbed with other frames.

You may pass null to this method. However getFrameIcon will return default icon defined in UIManager "DockableFrame.defaultIcon".

By default, VSNET and OFFICE2003 style don't show icon on dockable frame title pane. ECLIPSE/ECLIPSE3X and XERTO style do. But you can always change it by changing UIDefault "DockableFrameTitlePane.showIcon" to Boolean.TRUE to show the icon. You can use LookAndFeelFactory.addUIDefaultsCustomizer to do it. The reason is the same icon will be used on the tab when dockable frames are tabbed together and we don't want to display the same icon twice. UIDefault "JideTabbedPane.showIconOnTab" can be used to control if icon is visible on tab.

Parameters:
icon - the Icon to display in the title bar
See Also:
getFrameIcon()

getFrameIcon

public Icon getFrameIcon()
Returns the image displayed in the title bar of this dockable frame(usually in the top-left corner).

We don't allow null icon. So if the frameIcon was set to null, this method will return UIManager.getIcon("DockableFrame.defaultIcon") instead of returning null.

Returns:
the Icon displayed in the title bar.
See Also:
setFrameIcon(javax.swing.Icon)

getFocusOwner

protected Component getFocusOwner()
If this DockableFrame is active, returns the child that has focus. Otherwise, returns null.

Returns:
the component with focus, or null if no children have focus

addDockableFrameListener

public void addDockableFrameListener(DockableFrameListener l)
Adds the specified listener to receive dockable frame events from this dockable frame. If you want to listen to the events from all DockableFrames of a particular DockingManager, you can use DockingManager.addDockableFrameListener(com.jidesoft.docking.event.DockableFrameListener) method.

Parameters:
l - the dockable frame listener

removeDockableFrameListener

public void removeDockableFrameListener(DockableFrameListener l)
Removes the specified dockable frame listener so that it no longer receives dockable frame events from this dockable frame.

Parameters:
l - the dockable frame listener

getDockableFrameListeners

public DockableFrameListener[] getDockableFrameListeners()
Returns an array of all the DockableFrameListeners added to this DockableFrame with addDockableFrameListener.

Returns:
all of the DockableFrameListeners added or an empty array if no listeners have been added
See Also:
addDockableFrameListener(com.jidesoft.docking.event.DockableFrameListener)

fireDockableFrameEvent

protected void fireDockableFrameEvent(int id,
                                      DockingManager oppositeDockingManager)
Fires a dockable frame event.

Parameters:
id - the type of the event being fired. So far it has to be DOCKABLE_FRAME_TRANSFERRED. Otherwise, nothing happens.
oppositeDockingManager - the opposite docking manager. This is only used for transfer event.

fireDockableFrameEvent

protected void fireDockableFrameEvent(int id,
                                      DockableFrame oppositeDockableFrame)
Fires an dockable frame event.

Parameters:
id - the type of the event being fired; one of the following: If the event type is not one of the above, nothing happens.
oppositeDockableFrame - the opposite dockable frame. This is only used for activated and deactivated event.

fireDockableFrameEvent

protected void fireDockableFrameEvent(int id)

getContext

public DockContext getContext()
Get the DockContext used by DockableFrame.

Returns:
the DockContext used

setContext

public void setContext(DockContext context)
Sets the dock context.

Parameters:
context - the new context.

setHiddenPreviousState

public void setHiddenPreviousState(com.jidesoft.docking.PreviousState state)
Sets the state before the component switches to hidden mode.

Parameters:
state - the previous state.

getHiddenPreviousState

public com.jidesoft.docking.PreviousState getHiddenPreviousState()
Gets the state before the component switches to hidden mode

Returns:
state

saveHiddenPreviousState

public void saveHiddenPreviousState()
Save current state as hidden previous state. After invoke this method, getHiddenPreviousState() will return the current state. You could invoke this method to persist previous state if you want to invoke DockingManager.hideFrame(String)


setAvailablePreviousState

public void setAvailablePreviousState(com.jidesoft.docking.PreviousState state)
Sets the state before the component switches between available and unavailable.

Parameters:
state - the previous state.

getAvailablePreviousState

public com.jidesoft.docking.PreviousState getAvailablePreviousState()
Gets the state before the component switches between available and unavailable

Returns:
state

saveAvailablePreviousState

public void saveAvailablePreviousState()
Save current state as available previous state. After invoke this method, getAvailablePreviousState() will return the current state. You could invoke this method to persist previous state if you want to invoke setAvailable(boolean)


setMaximizedPreviousState

public void setMaximizedPreviousState(com.jidesoft.docking.PreviousState state)
Sets the state before the component switches between maximized and restore.

Parameters:
state - the previous state.

getMaximizedPreviousState

public com.jidesoft.docking.PreviousState getMaximizedPreviousState()
Gets the state before the component switches between maximized and restore

Returns:
state

saveMaximizedPreviousState

public void saveMaximizedPreviousState()
Save current state as maximized previous state. After invoke this method, getMaximizedPreviousState() will return the current state. You could invoke this method to persist previous state if you want to invoke DockingManager.maximizeFrame(String)


setClosePreviousState

public void setClosePreviousState(com.jidesoft.docking.PreviousState state)
Sets the state before the component before main JFrame is closed.

Parameters:
state - the previous state.

getClosePreviousState

public com.jidesoft.docking.PreviousState getClosePreviousState()
Gets the state before the component switch to hidden mode.

Returns:
state

saveClosePreviousState

public void saveClosePreviousState()
Save current state as close previous state. After invoke this method, getClosePreviousState() will return the current state. You could invoke this method to persist previous state if you want to invoke DockingManager.removeFrame(String)


setDockPreviousState

public void setDockPreviousState(com.jidesoft.docking.PreviousState state)
Save the state before the component switch to dock mode

Parameters:
state - the previous state.

getDockPreviousState

public com.jidesoft.docking.PreviousState getDockPreviousState()
Get the state before the component switch to dock mode

Returns:
state

saveDockPreviousState

public void saveDockPreviousState()
Save current state as dock previous state. After invoke this method, getDockPreviousState() will return the current state. You could invoke this method to persist previous state if you want to invoke DockingManager.dockFrame(String, int, int)


setFloatPreviousState

public void setFloatPreviousState(com.jidesoft.docking.PreviousState state)
Save the state before the component switch to floating mode

Parameters:
state - the previous state.

getFloatPreviousState

public com.jidesoft.docking.PreviousState getFloatPreviousState()
Get the state before the component switch to floating mode

Returns:
state

saveFloatPreviousState

public void saveFloatPreviousState()
Save current state as float previous state. After invoke this method, getFloatPreviousState() will return the current state. You could invoke this method to persist previous state if you want to invoke DockingManager.floatFrame(String, java.awt.Rectangle, boolean)


setAutohidePreviousState

public void setAutohidePreviousState(com.jidesoft.docking.PreviousState state)
Save the state before the component switch to auto-hide mode

Parameters:
state - the previous state.

getAutohidePreviousState

public com.jidesoft.docking.PreviousState getAutohidePreviousState()
Get the state before the component switch to auto-hide mode

Returns:
state before it is auto-hided

saveAutohidePreviousState

public void saveAutohidePreviousState()
Save current state as autohide previous state. After invoke this method, getAutohidePreviousState() will return the current state. You could invoke this method to persist previous state if you want to invoke DockingManager.autohideFrame(String, int, int)


isActive

public boolean isActive()
Gets if the dockable frame is active.

Returns:
if the dockable frame is active.

setActive

public void setActive(boolean active)
               throws PropertyVetoException
Set the active property and activate the dockable frame.

If the dockable frame is added to DockingManager, you shouldn't call this method directly. Instead, call DockingManager.activateFrame(String) to activate the dockable frame.

Parameters:
active - true if active
Throws:
PropertyVetoException - if the property change is vetoed.

isMaximized

public boolean isMaximized()
Gets if the dockable frame is maximized.

Returns:
if the dockable frame is maximized.

setMaximized

public void setMaximized(boolean maximized)
                  throws PropertyVetoException
Set the maximized property and activate the dockable frame.

Parameters:
maximized - true if maximized
Throws:
PropertyVetoException - if the property change is vetoed.

requestFocusInInternalWindow

public boolean requestFocusInInternalWindow()
Set the last focused component toT focus. This method is used when the dockable frame state or visibility is changed.

Specified by:
requestFocusInInternalWindow in interface Refocusable
Returns:
was focus requested on some Component

getDefaultFocusComponent

public Component getDefaultFocusComponent()
Gets the default focus component for the dockable frame. When the dockable frame is activated for the first time, this component will get focus.

See also setDefaultFocusComponent, getLastFocusedComponent, setLastFocusedComponent

Specified by:
getDefaultFocusComponent in interface Refocusable
Returns:
the default component.

setDefaultFocusComponent

public void setDefaultFocusComponent(Component defaultFocusComponent)
Sets the default focus component for the dockable frame. When the dockable frame is activated for the first time, this component will get focus.

See also getDefaultFocusComponent, getLastFocusedComponent, setLastFocusedComponent

Specified by:
setDefaultFocusComponent in interface Refocusable
Parameters:
defaultFocusComponent - the default component that will receive focus.

getFocusedComponent

public Component getFocusedComponent()
Gets the subcomponent of the dockable frame which holds focus. If the dockable frame is not activated this is the component the would receive focus if it becomes activate.

See also setLastFocusedComponent, getDefaultFocusComponent, setDefaultFocusComponent

Specified by:
getFocusedComponent in interface Refocusable
Returns:
the last-focused subcomponent

setLastFocusedComponent

public void setLastFocusedComponent(Component lastFocusedComponent)
Sets the subcomponent of the dockable frame which currently has focus. When the dockable frame is reactivated after being deactivated, this component will get focus returned to it.

See also getLastFocusedComponent, getDefaultFocusComponent, setDefaultFocusComponent

Parameters:
lastFocusedComponent - last-focused subcomponent

getDockingManager

public DockingManager getDockingManager()
Get the docking manager.

Specified by:
getDockingManager in interface DockableHolder
Returns:
the Docking Manager that manages this Dockable.

setVisible

public void setVisible(boolean aFlag)
Makes the component visible or invisible. Overrides Component.setVisible.

Overrides:
setVisible in class JComponent
Parameters:
aFlag - true to make the component visible; false to make it invisible

setDockingManager

public void setDockingManager(DockingManager dockingManager)
Set the docking manager for dockable frame.

Parameters:
dockingManager - the docking manager where this dockable frame is added to..

setDockedWidth

public void setDockedWidth(int dockedWidth)
Set the width of docked state.

Parameters:
dockedWidth - width

setDockedHeight

public void setDockedHeight(int dockedHeight)
Set the height when the component is docked inside a JFrame

Parameters:
dockedHeight - new height

getDockedWidth

public int getDockedWidth()
Get the width when the component is docked inside a JFrame

Returns:
width

getDockedHeight

public int getDockedHeight()
Get the height when the component is docked inside a JFrame

Returns:
height

setAutohideWidth

public void setAutohideWidth(int w)
Set the width when the component is auto-hide

Parameters:
w - new width

setAutohideHeight

public void setAutohideHeight(int autohideHeight)
Set the height when the component is auto-hide

Parameters:
autohideHeight - new height

getAutohideWidth

public int getAutohideWidth()
Get the width of the component when it's in auto-hide mode

Returns:
width

getAutohideHeight

public int getAutohideHeight()
Get the height of the component when it's in auto-hide mode

Returns:
height

getUndockedBounds

public Rectangle getUndockedBounds()
Get the un-restricted bounds. Unrestricted means when the dockable component is in floating mode

Returns:
undocked bounds

setUndockedBounds

public void setUndockedBounds(Rectangle undockedBounds)
Set the un-restricted bounds. Unrestricted means when the dockable component is in floating mode.

This is one special case when x and y of the bounds are both -1. If so, we will use the width and height of the bounds but will use the x and y at 20x20 below the location of the dockable frame's parent.

Parameters:
undockedBounds - new bounds

getDockID

public int getDockID()
Get dock id.

Returns:
the an int id that unique identify the component.

setDockID

public void setDockID(int id)
Description copied from interface: Dockable
Sets dock id.

Parameters:
id - new id

resetDockID

public void resetDockID()
Description copied from interface: Dockable
Resets dock id. It basically get a new id and discard the old one.


isAvailable

public boolean isAvailable()
Checks if the frame is available.

Returns:
true if it's available.

setAvailable

public void setAvailable(boolean available)
Sets true to make the frame available.

Parameters:
available - true if to make the frame available. False to make it not available.

setTitleBarComponent

public void setTitleBarComponent(JComponent component)
Sets a component which is part of the dockable frame's title bar.

Parameters:
component - title bar component

getTitleBarComponent

public JComponent getTitleBarComponent()
Gets the component which is part of dockable frame's title bar.

Returns:
the title bar component.

setTitleLabelComponent

public void setTitleLabelComponent(JComponent component)
Sets a component which will be used to replace the default title. The default title label is used to display the title and the icon. So if you use your own component, you have to set the title as the text on your component. You can pass in null so that the default title label will be used.

Parameters:
component - title label component

getTitleLabelComponent

public JComponent getTitleLabelComponent()
Gets the component which is used to replace the default title. Null if you never set it before.

Returns:
the title label component.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this DockableFrame. For dockable frames, the AccessibleContext takes the form of an AccessibleDockableFrame object. A new AccessibleDockableFrame instance is created if necessary.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleDockableFrame that serves as the AccessibleContext of this DockableFrame
See Also:
DockableFrame.AccessibleDockableFrame

isShowGripper

public boolean isShowGripper()
Checks if the gripper is visible.

Returns:
true if gripper is visible

setShowGripper

public void setShowGripper(boolean showGripper)
Sets the visibility of gripper.

When dockable frame is added to DockingManager, this attribute will be reset to whatever value in docking manager (dockingManager.isShowGripper()). If you want to all dockable frames to have or don't have the gripper, please use dockingManager.setShowGripper(). If you just want to a particular dockable frame different from other frames, you should call this method after it has been added docking manager. *

Parameters:
showGripper - true to show gripper

isShowTitleBar

public boolean isShowTitleBar()
Checks if the title bar is visible.

Returns:
true if the title bar is visible.

setShowTitleBar

public void setShowTitleBar(boolean showTitleBar)
Sets the visibility of the title bar.

When dockable frame is added to DockingManager, this attribute will be reset to whatever value in docking manager (dockingManager.isShowTitleBar()). If you want to all dockable frames to have or don't have the title bar, please use dockingManager.setShowTitleBar(). If you just want to a particular dockable frame different from other frames, you should call this method after it has been added docking manager.

Parameters:
showTitleBar - true to show title bar.

isShowContentPane

public boolean isShowContentPane()
Checks if the content pane is visible.

Returns:
true if the content pane is visible.

setShowContentPane

public void setShowContentPane(boolean showContentPane)
Sets the visibility of the content pane.

Parameters:
showContentPane - true to show the content pane .

isMaximizable

public boolean isMaximizable()

setMaximizable

public void setMaximizable(boolean maximizable)

isNotified

public boolean isNotified()
Checks if the dockable frame is in notified mode. Notified mode can be used to tell users that there is something important in the frame.

Returns:
true if the dockable frame is in notified mode.

setNotified

public void setNotified(boolean notified)
Sets the notified mode. Notified mode can be used to tell users that there is something important in the frame. If the frame is active, nothing will happen. If the frame is docked in tabbed pane, the title of its tab will flash for 10s then stay in red after 10s.

Parameters:
notified - true to notify the frame. False to stop notify frame.

shouldNotify

protected boolean shouldNotify(FrameContainer frameContainer)
Checks if the frame should be notified. The frameContainer is the one that has this dockable frame. By default, we only return true if the frame is not selected.

Parameters:
frameContainer - the FrameContainer
Returns:
true to notify. Otherwise false.

createNotificationFlasher

protected NotificationFlasher createNotificationFlasher(AutoHideContainer autoHideContainer)

createNotificationFlasher

protected NotificationFlasher createNotificationFlasher(FrameContainer fc)

shouldVetoShowing

public boolean shouldVetoShowing()
Checks if the frame can be shown while loading layout files. The default implementation is to just return false to show every possible DockableFrame. You could override this method to let different users have different DockableFrame show up with the same layout file.

Returns:
false by default. Subclass can override it to conditionally return true or false.

shouldVetoHiding

public boolean shouldVetoHiding()
Checks if the frame can be hidden. This method gives dockable frame a chance to veto hideFrame() method call from DockingManager. Subclass can override this method to conditionally return true so that the frame won't be hidden in certain condition.

This method will only be called when user pressed the hide button on the title bar of dockable frame. Calling hideFrame method directly will not trigger this method.

Returns:
false by default. Subclass can override it to conditionally return true or false.

shouldVetoRemoving

public boolean shouldVetoRemoving()
Checks if the frame can be removed. This method gives dockable frame a chance to veto removeFrame() method call from DockingManager. Subclass can override this method to conditionally return true so that the frame won't be removed in certain condition.

Calling removeFrame method directly will not trigger this method.

Returns:
false by default. Subclass can override it to conditionally return true or false.

isSlidingAutohide

public boolean isSlidingAutohide()
This is a flag to determine the displaying behavior of a dockable frame when it is in autohidden mode. If this flag is true, autohide window will slide out on top of other contents in the main container. If false, autohide window will push the contents in the main container aside so no contents will be covered.

Returns:
true or false.

setSlidingAutohide

public void setSlidingAutohide(boolean slidingAutohide)
Sets the displaying behavior of a dockable frame when it is in autohidden mode.

Please set the flag during initialization of the dockable frame. We don't support changing this flag on fly.

Parameters:
slidingAutohide - true or false.
See Also:
isSlidingAutohide()

dispose

public void dispose()
Clean up references so we can gc this frame and the docking manager.

Since 3.4.1, dispose a frame will also remove all UndoableEdits that contains the information of the DockableFrame.


isTransient

public boolean isTransient()
Checks if the dockable frame is transient.

Returns:
true if dockable frame is transient. Otherwise false. It is false by default.
See Also:
setTransient(boolean)

setTransient

public void setTransient(boolean isTransient)
Sets if the dockable frame is transient. If a dockable frame is transient, saving layout will not save any information about this dockable frame. When user closes the frame from UI, it is removed permanently. If you want to create a dockable frame on fly and temporarily use it, you should set transient property to true.

Parameters:
isTransient - true or false.

getInitMode

public int getInitMode()
Gets initial state.

Returns:
initial state

setInitMode

public void setInitMode(int initMode)
Sets the initial state. The available states are defined in DockContext. They are STATE_HIDDEN, STATE_FLOATING, STATE_AUTOHIDE and STATE_FRAMEDOCKED. It also supports a few negative value such as STATE_HIDDEN - STATE_FLOATING, STATE_HIDDEN - STATE_AUTOHIDE and STATE_HIDDEN - STATE_FRAMEDOCKED. In those negative cases, the frame will initially be hidden. But when showFrame is called on this frame, it will use the corresponding mode to show the frame. For example, if initMode is set to STATE_HIDDEN - STATE_FLOATING, the frame will initially be hidden. When showFrame is called, the frame will be floated.

Parameters:
initMode - initial state

getInitSide

public int getInitSide()
Gets the initial side.

Returns:
the initial side.

setInitSide

public void setInitSide(int initSide)
Sets the initial side. The valid values are DOCK_SIDE_EAST, DOCK_SIDE_WEST, DOCK_SIDE_SOUTH, DOCK_SIDE_NORTH, and DOCK_SIDE_CENTER, all defined in DockContext. If you ever use DOCK_SIDE_CENTER, dockable frame will appear in workspace area thus you need to cal Workspace.setAcceptDockableFrame(boolean) and set it to true. If so, you shouldn't add any other arbitrary components to workspace area.

Parameters:
initSide - new initial side.

getInitIndex

public int getInitIndex()
Gets the init index.

Returns:
init index.

setInitIndex

public void setInitIndex(int initIndex)
Sets initial index. After setting initial side and mode, user can use this parameter to define initial position.
If all frames' initMode are FRAMEDOCKED and initSide are SOUTH, the all frames with the same index will form a tabbed pane. Frames with index 0 will appear before frames with index 1. In this case, only 0 and 1 is allowed.
If initMode is AUTOHIDE, the same indexed frames will form a group. In this case, any index greater than 0 is allowed.
If initMode is FLOATING, the same indexed frames will form a tabbed pane and in one floating window. In this case, any index greater than 0 is allowed.

Parameters:
initIndex - the initial index

createFocusChangeListener

protected PropertyChangeListener createFocusChangeListener()

addNotify

public void addNotify()
We've been added to the swing hierarchy, so start updating _lastFocusedComponent.

Overrides:
addNotify in class JComponent

removeNotify

public void removeNotify()
We've been removed from the swing hierarchy, so stop updating _lastFocusedComponent. This is needed because during the removal process, if we own focus, our nextFocusHelper() method transfers focus to other subcomponents. This makes _lastFocusedComponent incorrect.

Overrides:
removeNotify in class JComponent

getPreferredAutohideSide

public int getPreferredAutohideSide()
Gets preferred autohide side. By default the value is -1, meaning it will use current dock side as autohide side.

Returns:
the preferred autohide side.

setPreferredAutohideSide

public void setPreferredAutohideSide(int preferredAutohideSide)
Sets preferred autohide side. A dockable frame can be autohidden into four sides. By default the value is -1, meaning it will use current dock side as autohide side. By setting this value, you can determine which side a dockable frame will be autohidden to. If you set all dockable frames' preferred autohide side to one side, you indirectly disable side panes on other three sides.

Parameters:
preferredAutohideSide - preferred autohide side.

isTabDockAllowed

public boolean isTabDockAllowed()
Checks if tab dock is allowed. If a dockable frame doesn't allow tab dock, you cannot drag another dockable frame and dock with this dockable frame together as a tabbed pane.

Returns:
true or false.

setTabDockAllowed

public void setTabDockAllowed(boolean tabDockAllowed)
Sets tab dock allowed flag.

Parameters:
tabDockAllowed - true or false.

isAlwaysStayInGroup

public boolean isAlwaysStayInGroup()
Checks if the frame is always tabbed with a group. If the flag is true, any time you drag this frame, the entire group will be dragged.

The default value of this flag is false.

Returns:
true if the frame should always stay in the group. Otherwise false.
See Also:
isTabDockAllowed()

setAlwaysStayInGroup

public void setAlwaysStayInGroup(boolean alwaysStayInGroup)
Ses the always stay in group flag.

Parameters:
alwaysStayInGroup - the flag

isSideDockAllowed

public boolean isSideDockAllowed()
Checks if side dock is allowed. If a dockable frame doesn't allow side dock, you cannot drag another dockable frame and dock to the side of this dockable frame to form a split pane.

Returns:
true or false.

setSideDockAllowed

public void setSideDockAllowed(boolean sideDockAllowed)
Sets the side dock allowed flag.

Parameters:
sideDockAllowed - true or false.

paramString

protected String paramString()
Overrides:
paramString in class JComponent

getCloseAction

public Action getCloseAction()
Gets the action for the close button. You can set it using setCloseAction(javax.swing.Action). If you never set it, we will create DockableFrame.CloseAction and use it.

Returns:
the action for the close button.

setCloseAction

public void setCloseAction(Action closeAction)
Sets the action for the close button. This action will be added as ActionListener to the close button as well as set as the action for the close menu item. If you want to hide/show the button or enable/disable the menu item, you can override isEnabled() method in Action to do it.

Property change event on PROPERTY_CLOSE_ACTION will be fired.

Parameters:
closeAction - the close action.

getHideAutohideAction

public Action getHideAutohideAction()

setHideAutohideAction

public void setHideAutohideAction(Action hideAutohideAction)
Sets the action for the hide autohide button. This action will be added as ActionListener to the hide autohide button as well as set as the action for the hide autohide menu item. If you want to hide/show the button or enable/disable the menu item, you can override isEnabled() method in Action to do it.

Property change event on PROPERTY_HIDE_AUTOHIDE_ACTION will be fired.

Parameters:
hideAutohideAction - the hide autohide action.

getFloatingAction

public Action getFloatingAction()
Gets the action for the floating button. You can set it using setFloatingAction(javax.swing.Action). If you never set it, we will create DockableFrame.FloatingAction and use it.

Returns:
the action for the floating button.

getFloatingAction

public Action getFloatingAction(boolean single)
Gets the action for the floating button. You can set it using setFloatingAction(javax.swing.Action). If you never set it, we will create DockableFrame.FloatingAction and use it.

Parameters:
single - if the menu item is triggered by a right mouse click on the tab, this flag will be true.
Returns:
the action for the floating button.

setFloatingAction

public void setFloatingAction(Action floatingAction)
Sets the action for the floating button. This action will be added as ActionListener to the floating button as well as set as the action for the floating menu item. If you want to hide/show the button or enable/disable the menu item, you can override isEnabled() method in Action to do it.

Property change event on PROPERTY_FLOATING_ACTION will be fired.

Parameters:
floatingAction - the floating action.

getAutohideAction

public Action getAutohideAction()
Gets the action for the autohide button. You can set it using setAutohideAction(javax.swing.Action). If you never set it, we will create DockableFrame.AutohideAction and use it.

Returns:
the action for the autohide button.

setAutohideAction

public void setAutohideAction(Action autohideAction)
Sets the action for the autohide button. This action will be added as ActionListener to the autohide button as well as set as the action for the autohide menu item. If you want to hide/show the button or enable/disable the menu item, you can override isEnabled() method in Action to do it.

Property change event on PROPERTY_AUTOHIDE_ACTION will be fired.

Parameters:
autohideAction - the autohide action.

getMaximizeAction

public Action getMaximizeAction()
Gets the action for the maximize button. You can set it using setMaximizeAction(javax.swing.Action). If you never set it, we will create DockableFrame.MaximizeAction and use it.

Returns:
the action for the maximize button.

setMaximizeAction

public void setMaximizeAction(Action maximizeAction)
Sets the action for the maximize button. This action will be added as ActionListener to the maximize button as well as set as the action for the maximize menu item. If you want to hide/show the button or enable/disable the menu item, you can override isEnabled() method in Action to do it.

Property change event on PROPERTY_MAXIMIZE_ACTION will be fired.

Parameters:
maximizeAction - the maximize action.

getDockableAction

public Action getDockableAction()
Gets the action for the dockable button. You can set it using setDockableAction(javax.swing.Action). If you never set it, we will create DockableFrame.DockableAction and use it.

Returns:
the action for the dockable button.

setDockableAction

public void setDockableAction(Action dockableAction)
Sets the action for the dockable button. This action will be added as ActionListener to the dockable button as well as set as the action for the dockable menu item. If you want to enable/disable the menu item, you can override isEnabled() method in Action to do it.

Property change event on PROPERTY_DOCKABLE_ACTION will be fired.

Parameters:
dockableAction - the dockable action.

getCustomDoubleClickAction

public Action getCustomDoubleClickAction()
Gets the action for the double click button.

Returns:
the action for the doubleclick button.

setCustomDoubleClickAction

public void setCustomDoubleClickAction(Action customDoubleClickAction)
Sets the action for the double click on the title pane. This action will be triggered when dockingManager#setDoubleClickAction is set to DOUBLE_CLICK_CUSTOMIZED.

Parameters:
customDoubleClickAction - the double click action on the title pane.

setPreferredSize

public void setPreferredSize(Dimension preferredSize)
Overrides:
setPreferredSize in class JComponent

isShowContextMenu

public boolean isShowContextMenu()
Checks if the context menu should be shown.

Returns:
true if context menu will be shown. Otherwise false.

setShowContextMenu

public void setShowContextMenu(boolean showContextMenu)
Sets the flag to show context menu or not.

Parameters:
showContextMenu - true or false.

isDraggingTarget

protected boolean isDraggingTarget(MouseEvent e)
Checks if the mouse event is a valid dragging event. Subclass can override it to return true or false. By default, we will check the source of the event. If the event is from titlePane or from gripper, we will return true. Here is the default code.
 if (getDockingManager() == null) {
     return false;
 }
 Object source = e.getSource();
 return ((!isShowGripper() || (_dockingManager != null && !_dockingManager.isDragGripperOnly()))
 && source == getUI().getTitlePane()) || source instanceof Gripper;
 
If you override and return true, you can drag any empty space in DockableFrame to drag.

Parameters:
e - the MouseEvent
Returns:
true to allow dragging. Otherwise false.

getDraggingTarget

protected Component getDraggingTarget(MouseEvent e)

getDefaultEscapeAction

public int getDefaultEscapeAction()
Gets the default action when the escape key is pressed in the dockable frame. Possible values are ESCAPE_ACTION_TO_YIELD_FOCUS, ESCAPE_ACTION_DO_NOTING, ESCAPE_ACTION_TO_HIDE, and ESCAPE_ACTION_TO_REMOVE.

Returns:
the default action when the escape key is pressed.

setDefaultEscapeAction

public void setDefaultEscapeAction(int defaultEscapeAction)
Sets the default action when the escape key is pressed in the dockable frame.

Parameters:
defaultEscapeAction - the behavior when the escape key is pressed in the dockable frame. Valid values are ESCAPE_ACTION_TO_YIELD_FOCUS, ESCAPE_ACTION_DO_NOTING, ESCAPE_ACTION_TO_HIDE, and ESCAPE_ACTION_TO_REMOVE.

getDefaultCloseAction

public int getDefaultCloseAction()
Gets the default action when the close button is clicked on the dockable frame. Possible values are CLOSE_ACTION_TO_HIDE, and CLOSE_ACTION_TO_REMOVE.

Returns:
the default action when the close button is pressed.

setDefaultCloseAction

public void setDefaultCloseAction(int defaultCloseAction)
Sets the default action when the close button is clicked on the dockable frame.

Parameters:
defaultCloseAction - the behavior when the close key is pressed in the dockable frame. Valid values are CLOSE_ACTION_TO_HIDE, and CLOSE_ACTION_TO_REMOVE.

isAutohideWhenActive

public boolean isAutohideWhenActive()
Checks if the dockable frame will autohide even when the frame is active. By default, an active autohide_showing dockable frame will not hide unless you click somewhere outside the dockable frame. But there is a need from user that if the dockable frame has some dragable item, they want the autohide_showing frame to be auto-hidden when dragging outside the frame even when the frame is active. That's where you need to set this flag to be true.

Returns:
true or false.

setAutohideWhenActive

public void setAutohideWhenActive(boolean autohideWhenActive)
Set the autohideWhenActive flag. By default, an active autohide_showing dockable frame will not hide unless you click somewhere outside the dockable frame. But there is a need from user that if the dockable frame has some dragable item, they want the autohide_showing frame to be auto-hidden when dragging outside the frame even when the frame is active. That's where you need to set this flag to be true.

Parameters:
autohideWhenActive - true or false.

getButtonsOrder

public int[] getButtonsOrder()
Gets the buttons order.

Returns:
the buttons order.

setButtonsOrder

public void setButtonsOrder(int[] buttonsOrder)
Sets the buttons order. It is an int array of BUTTON_CLOSE, BUTTON_AUTOHIDE, BUTTON_HIDE_AUTOHIDE, BUTTON_FLOATING, and BUTTON_MAXIMIZE. The order is from right to left.

Parameters:
buttonsOrder - the buttons order.

isActivateAfterSliding

@Deprecated
public boolean isActivateAfterSliding()
Deprecated. This was for internal eventing and is no longer needed.

Returns:
false

addAdditionalButtonActions

@Deprecated
public void addAdditionalButtonActions(Action action,
                                                  Icon icon)
Deprecated. replaced by addAdditionalButtonActions(javax.swing.Action)

Adds an additional button to the title bar. The button is added in front of the default buttons.

Parameters:
action - the action for the button, the icon and tooltip are taken from here
icon - the icon of the button

addAdditionalButtonActions

public void addAdditionalButtonActions(Action action)
Adds an additional button to the title bar. The button is added in front of the default buttons.

Parameters:
action - the action for the button, the icon and tooltip are taken from here

removeAdditionalButtonActions

public void removeAdditionalButtonActions(Action action)
Removes an addtional button from the title bar.

Parameters:
action - the action for the button to be removed

getActionIcon

public Icon getActionIcon(Action action)
Get icon for the designated action.

Parameters:
action - the action
Returns:
the corresponding icon.

getAdditionalButtonActions

public List<Action> getAdditionalButtonActions()
Returns the additional button actions.

Returns:
the additional button actions.

setTabBackground

public void setTabBackground(Color background)
Sets the tab background color of the dockable frame if it's autohidden or docked in a FrameContainer with multiple dockable frames.

By default, the value is null which means default background will be used.

Parameters:
background - the background color

getTabBackground

public Color getTabBackground()
Description copied from interface: TabColorProvider
Gets the background color the tab.

Specified by:
getTabBackground in interface TabColorProvider
Returns:
the background color.

setTabForeground

public void setTabForeground(Color foreground)
Sets the tab foreground color of the dockable frame if it's autohidden or docked in a FrameContainer with multiple dockable frames.

By default, the value is null which means default foreground will be used.

Parameters:
foreground - the foreground color

getTabForeground

public Color getTabForeground()
Description copied from interface: TabColorProvider
Gets the foreground color the tab.

Specified by:
getTabForeground in interface TabColorProvider
Returns:
the foreground color.

JIDE 3.5.15