|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.jidesoft.docking.DockableFrame
public class DockableFrame
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 addDockableFrame
s 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);
DockableFrameEvent
,
DockingManager
,
Serialized FormNested 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 DockableFrameListener s 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_CONTENT_PANE
public static final String PROPERTY_MENU_BAR
public static final String PROPERTY_TAB_TITLE
public static final String PROPERTY_SIDE_TITLE
public static final String PROPERTY_TITLE
public static final String PROPERTY_KEY
public static final String PROPERTY_LAYERED_PANE
public static final String PROPERTY_ROOT_PANE
public static final String PROPERTY_GLASS_PANE
public static final String PROPERTY_FRAME_ICON
public static final String PROPERTY_AVAILABLE_BUTTONS
public static final String PROPERTY_BUTTONS_ORDER
public static final String PROPERTY_TITLE_BAR_COMPONENT
public static final String PROPERTY_TITLE_LABEL_COMPONENT
public static final String PROPERTY_VISIBLE
public static final String PROPERTY_AVAILABLE
public static final String PROPERTY_SLIDING_AUTOHIDE
public static final String PROPERTY_TRANSIENT
public static final String PROPERTY_FLOATABLE
public static final String PROPERTY_HIDABLE
public static final String PROPERTY_DOCKABLE
public static final String PROPERTY_AUTOHIDABLE
public static final String PROPERTY_MAXIMIZABLE
public static final String PROPERTY_REARRANGABLE
public static final String PROPERTY_ACTIVE
public static final String PROPERTY_MAXIMIZED
public static final String PROPERTY_HIDDEN
public static final String PROPERTY_DOCKED
public static final String PROPERTY_FLOATED
public static final String PROPERTY_AUTOHIDE
public static final String PROPERTY_AUTOHIDE_SHOWING
public static final String PROPERTY_TAB_DOCK_ALLOWED
public static final String PROPERTY_SIDE_DOCK_ALLOWED
public static final String PROPERTY_STAY_IN_GROUP
public static final String PROPERTY_SHOW_GRIPPER
public static final String PROPERTY_SHOW_TITLE_BAR
public static final String PROPERTY_SHOW_CONTENT_PANE
public static final String PROPERTY_SHOW_CONTEXT_MENU
public static final String PROPERTY_INIT_SIDE
public static final String PROPERTY_INIT_MODE
public static final String PROPERTY_INIT_INDEX
public static final String PROPERTY_DOCKED_WIDTH
public static final String PROPERTY_DOCKED_HEIGHT
public static final String PROPERTY_AUTOHIDE_WIDTH
public static final String PROPERTY_AUTOHIDE_HEIGHT
public static final String PROPERTY_UNDOCKED_BOUNDS
public static final String PROPERTY_PREFERRED_AUTOHIDE_SIDE
public static final String PROPERTY_CLOSE_ACTION
public static final String PROPERTY_AUTOHIDE_ACTION
public static final String PROPERTY_HIDE_AUTOHIDE_ACTION
public static final String PROPERTY_FLOATING_ACTION
public static final String PROPERTY_MAXIMIZE_ACTION
public static final String PROPERTY_DOCKABLE_ACTION
public static final String PROPERTY_DOUBLE_CLICK_ACTION
public static final String PROPERTY_DEFAULT_CLOSE_ACTION
public static final String PROPERTY_DEFAULT_AUTOHIDE_ACTION
public static final String PROPERTY_DEFAULT_ESCAPE_ACTION
public static final String PROPERTY_AUTOHIDE_WHEN_ACTIVE
@Deprecated public static final String PROPERTY_ADDITONAL_BUTTON_ACTIONS
PROPERTY_ADDITIONAL_BUTTON_ACTIONS
public static final String PROPERTY_ADDITIONAL_BUTTON_ACTIONS
public static final int BUTTON_CLOSE
public static final int BUTTON_HIDE_AUTOHIDE
public static final int BUTTON_AUTOHIDE
public static final int BUTTON_FLOATING
public static final int BUTTON_MAXIMIZE
public static final int BUTTON_ALL
protected PropertyChangeListener _focusChangeListener
protected Action _closeAction
protected Action _hideAutohideAction
protected Action _floatingAction
protected Action _autohideAction
protected Action _maximizeAction
protected Action _dockableAction
protected Action _customDoubleClickAction
protected boolean _showContextMenu
public static final int CLOSE_ACTION_TO_HIDE
public static final int CLOSE_ACTION_TO_REMOVE
public static final int CLOSE_ACTION_TO_REMOVE_AND_DISPOSE
public static final int AUTOHIDE_ACTION_TO_REMAIN_ACTIVE
public static final int ESCAPE_ACTION_TO_YIELD_FOCUS
public static final int ESCAPE_ACTION_DO_NOTING
public static final int ESCAPE_ACTION_TO_HIDE
public static final int ESCAPE_ACTION_TO_REMOVE
Constructor Detail |
---|
public DockableFrame()
public DockableFrame(String key)
key
and default icon.
key
- key of the dockable framepublic DockableFrame(Icon frameIcon)
frameIcon
- icon of the dockable framepublic DockableFrame(String key, Icon frameIcon)
key
and icon.
key
- key of the dockable frameframeIcon
- icon of the dockable frameMethod Detail |
---|
protected String getResourceString(String key)
key
- the resource key
protected void addFocusTracker()
public boolean isOpaque()
isOpaque
in class JComponent
JComponent.setOpaque(boolean)
public MouseInputListener createDockableFrameMouseInputListener()
DockableFrameMouseInputAdapter
and return it.
DockableFrame
.protected void deinstallMouseHandlers()
protected void installMouseHandlers()
DockableFrame.
protected JRootPane createRootPane()
JRootPane
.
JRootPane
JRootPane
public DockableFrameUI getUI()
DockableFrameUI
object that renders this componentpublic void setUI(DockableFrameUI ui)
DockableFrame
.
ui
- the UI delegatepublic void updateUI()
UIManager
that the look and feel has changed. Replaces the current UI object
with the latest version from the UIManager
.
updateUI
in class JComponent
JComponent.updateUI()
public String getUIClassID()
getUIClassID
in class JComponent
JComponent.getUIClassID()
,
UIDefaults.getUI(javax.swing.JComponent)
protected boolean isRootPaneCheckingEnabled()
add
and setLayout
cause an exception to be thrown.
true
if add
and setLayout
are checkedaddImpl(java.awt.Component, java.lang.Object, int)
,
setLayout(java.awt.LayoutManager)
,
setRootPaneCheckingEnabled(boolean)
protected void setRootPaneCheckingEnabled(boolean enabled)
add
and setLayout
cause an exception to be thrown.
enabled
- a boolean value, true
if checking is to be enabled, which cause the exceptions to be
thrownaddImpl(java.awt.Component, java.lang.Object, int)
,
setLayout(java.awt.LayoutManager)
,
isRootPaneCheckingEnabled()
protected void addImpl(Component comp, Object constraints, int index)
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.
addImpl
in class Container
comp
- the Component
to be addedconstraints
- the object containing the constraints, if anyindex
- the index
Error
- if called with isRootPaneChecking
true
setRootPaneCheckingEnabled(boolean)
public void remove(Component comp)
remove
in class Container
comp
- the component to be removedContainer.add(java.awt.Component)
public void setLayout(LayoutManager manager)
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.
setLayout
in class Container
manager
- the LayoutManager
Error
- if called with isRootPaneChecking
true
setRootPaneCheckingEnabled(boolean)
public JMenuBar getJMenuBar()
JMenuBar
for this DockableFrame
, or null
if no menu
bar has been set.
JMenuBar
used by this dockable framesetJMenuBar(javax.swing.JMenuBar)
public void setJMenuBar(JMenuBar m)
menuBar
property for this DockableFrame
.
m
- the JMenuBar
to use in this dockable framegetJMenuBar()
public Container getContentPane()
public void setContentPane(Container c)
DockableFrame
's contentPane
property.
c
- the content pane for this dockable frame
IllegalComponentStateException
- (a runtime exception) if the content pane parameter is null
RootPaneContainer.getContentPane()
public JLayeredPane getLayeredPane()
JLayeredPane
objectRootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)
,
RootPaneContainer.getLayeredPane()
public void setLayeredPane(JLayeredPane layered)
DockableFrame
's layeredPane
property.
layered
- the JLayeredPane
for this dockable frame
IllegalComponentStateException
- (a runtime exception) if the layered pane parameter is null
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)
public Component getGlassPane()
RootPaneContainer.setGlassPane(java.awt.Component)
public void setGlassPane(Component glass)
DockableFrame
's glassPane
property.
glass
- the glass pane for this dockable frameRootPaneContainer.getGlassPane()
public JRootPane getRootPane()
rootPane
object for this dockable frame.
getRootPane
in class JComponent
rootPane
propertyRootPaneContainer.getRootPane()
protected void setRootPane(JRootPane root)
rootPane
property for this DockableFrame
. This method is called by the
constructor.
root
- the new JRootPane
objectpublic int getAvailableButtons()
public void setAvailableButtons(int availableButtons)
availableButtons
- the visibilities of each buttons. It's a bit wise OR of values specified at BUTTON_XXX.public void setHidable(boolean b)
DockableFrame
can be hidden by some user action.
b
- a boolean value, where true
means this dockable frame can be closedpublic boolean isHidable()
DockableFrame
can be closed by some user action.
true
if this dockable frame can be closedpublic boolean isHidden()
DockableFrame
is currently hidden.
true
if this _dockable frame is hidden, false
otherwisepublic void setHidden(boolean b) throws PropertyVetoException
true
. It will fire
property change event on PROPERTY_HIDDEN
.
b
- can be true
or false<.code>
- Throws:
PropertyVetoException
- when the attempt to set the property is vetoed by the DockableFrame
- See Also:
isHidden()
public void setDockable(boolean b)
DockableFrame
can be docked by some user action.
b
- a boolean, where true
means this dockable frame can be dockedpublic boolean isDockable()
DockableFrame
can be docked by some user action.
true
if this dockable frame can be dockable, false
otherwisepublic void setAutohidable(boolean b)
DockableFrame
can be resized by some user action.
b
- a boolean, where true
means this dockable frame can be resizedpublic boolean isAutohidable()
DockableFrame
can be autohidable by some user action.
true
if this dockable frame can be autohidable, false
otherwisepublic void setFloatable(boolean b)
floatable
property, which must be true
for the user to be able to make the
DockableFrame
floated.
b
- a boolean, where true
means this dockable frame can be floatedpublic boolean isFloatable()
floatable
property, which by default is false
.
floatable
property.setFloatable(boolean)
public void setRearrangable(boolean b)
DockableFrame
can be docked by some user action.
b
- a boolean, where true
means this dockable frame can be dockedpublic boolean isRearrangable()
DockableFrame
can be docked by some user action.
true
if this dockable frame can be dockable, false
otherwisepublic boolean isFloated()
DockableFrame
is currently floating.
true
if this dockable frame is floatingpublic boolean isDocked()
DockableFrame
is currently docked.
true
if this dockable frame is docked, false
otherwiseprotected void setDocked(boolean b) throws PropertyVetoException
b
- Always pass in true.
PropertyVetoException
- if the property change is vetoed.protected void setFloated(boolean b) throws PropertyVetoException
b
- Always pass in true.
PropertyVetoException
- if the property change is vetoed.protected void setAutohide(boolean b) throws PropertyVetoException
b
- Always pass in true.
PropertyVetoException
- if the property change is vetoed.protected void setAutohideShowing(boolean b) throws PropertyVetoException
b
- Always pass in true.
PropertyVetoException
- if the property change is vetoed.public void setKey(String key)
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.
key
- a String
containing this dockable frame's keypublic String getKey()
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.
String
containing this dockable frame's keypublic String getTabTitle()
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.
String
containing this dockable frame's tab title.setTabTitle(java.lang.String)
public void setTabTitle(String title)
DockableFrame
tab title.
title
- the String
to display on the tab.getTabTitle()
public String getSideTitle()
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.
String
containing this dockable frame's side title.setSideTitle(java.lang.String)
public void setSideTitle(String title)
DockableFrame
side title.
title
- the String
to display on the side pane.getSideTitle()
public String getTitle()
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.
String
containing this dockable frame's title bar.setTitle(String)
public void setTitle(String title)
DockableFrame
title.
title
- the String
to display in the title bar.public boolean isAutohide()
DockableFrame
is currently autohidden.
true
if this dockable frame is currently autohidden.public boolean isAutohideShowing()
DockableFrame
is currently in autohide mode and is visible.
true
if this dockable frame is currently in autohide mode and is visible.public void setFrameIcon(Icon icon)
icon
- the Icon
to display in the title bargetFrameIcon()
public Icon getFrameIcon()
Icon
displayed in the title bar.setFrameIcon(javax.swing.Icon)
protected Component getFocusOwner()
DockableFrame
is active, returns the child that has focus. Otherwise, returns
null
.
null
if no children have focuspublic void addDockableFrameListener(DockableFrameListener l)
DockingManager.addDockableFrameListener(com.jidesoft.docking.event.DockableFrameListener)
method.
l
- the dockable frame listenerpublic void removeDockableFrameListener(DockableFrameListener l)
l
- the dockable frame listenerpublic DockableFrameListener[] getDockableFrameListeners()
DockableFrameListener
s added to this DockableFrame
with
addDockableFrameListener
.
DockableFrameListener
s added or an empty array if no listeners have been addedaddDockableFrameListener(com.jidesoft.docking.event.DockableFrameListener)
protected void fireDockableFrameEvent(int id, DockingManager oppositeDockingManager)
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.protected void fireDockableFrameEvent(int id, DockableFrame oppositeDockableFrame)
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.protected void fireDockableFrameEvent(int id)
public DockContext getContext()
DockContext
used by DockableFrame
.
public void setContext(DockContext context)
context
- the new context.public void setHiddenPreviousState(com.jidesoft.docking.PreviousState state)
state
- the previous state.public com.jidesoft.docking.PreviousState getHiddenPreviousState()
public void saveHiddenPreviousState()
getHiddenPreviousState()
will
return the current state. You could invoke this method to persist previous state if you want to invoke DockingManager.hideFrame(String)
public void setAvailablePreviousState(com.jidesoft.docking.PreviousState state)
state
- the previous state.public com.jidesoft.docking.PreviousState getAvailablePreviousState()
public void saveAvailablePreviousState()
getAvailablePreviousState()
will return the current state. You could invoke this method to persist previous state if you want to invoke
setAvailable(boolean)
public void setMaximizedPreviousState(com.jidesoft.docking.PreviousState state)
state
- the previous state.public com.jidesoft.docking.PreviousState getMaximizedPreviousState()
public void saveMaximizedPreviousState()
getMaximizedPreviousState()
will return the current state. You could invoke this method to persist previous state if you want to invoke
DockingManager.maximizeFrame(String)
public void setClosePreviousState(com.jidesoft.docking.PreviousState state)
state
- the previous state.public com.jidesoft.docking.PreviousState getClosePreviousState()
public void saveClosePreviousState()
getClosePreviousState()
will
return the current state. You could invoke this method to persist previous state if you want to invoke DockingManager.removeFrame(String)
public void setDockPreviousState(com.jidesoft.docking.PreviousState state)
state
- the previous state.public com.jidesoft.docking.PreviousState getDockPreviousState()
public void saveDockPreviousState()
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)
public void setFloatPreviousState(com.jidesoft.docking.PreviousState state)
state
- the previous state.public com.jidesoft.docking.PreviousState getFloatPreviousState()
public void saveFloatPreviousState()
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)
public void setAutohidePreviousState(com.jidesoft.docking.PreviousState state)
state
- the previous state.public com.jidesoft.docking.PreviousState getAutohidePreviousState()
public void saveAutohidePreviousState()
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)
public boolean isActive()
public void setActive(boolean active) throws PropertyVetoException
DockingManager.activateFrame(String)
to activate the dockable frame.
active
- true if active
PropertyVetoException
- if the property change is vetoed.public boolean isMaximized()
public void setMaximized(boolean maximized) throws PropertyVetoException
maximized
- true if maximized
PropertyVetoException
- if the property change is vetoed.public boolean requestFocusInInternalWindow()
requestFocusInInternalWindow
in interface Refocusable
public Component getDefaultFocusComponent()
setDefaultFocusComponent
, getLastFocusedComponent
,
setLastFocusedComponent
getDefaultFocusComponent
in interface Refocusable
public void setDefaultFocusComponent(Component defaultFocusComponent)
getDefaultFocusComponent
, getLastFocusedComponent
,
setLastFocusedComponent
setDefaultFocusComponent
in interface Refocusable
defaultFocusComponent
- the default component that will receive focus.public Component getFocusedComponent()
setLastFocusedComponent
, getDefaultFocusComponent
,
setDefaultFocusComponent
getFocusedComponent
in interface Refocusable
public void setLastFocusedComponent(Component lastFocusedComponent)
getLastFocusedComponent
, getDefaultFocusComponent
,
setDefaultFocusComponent
lastFocusedComponent
- last-focused subcomponentpublic DockingManager getDockingManager()
getDockingManager
in interface DockableHolder
public void setVisible(boolean aFlag)
Component.setVisible
.
setVisible
in class JComponent
aFlag
- true to make the component visible; false to make it invisiblepublic void setDockingManager(DockingManager dockingManager)
dockingManager
- the docking manager where this dockable frame is added to..public void setDockedWidth(int dockedWidth)
dockedWidth
- widthpublic void setDockedHeight(int dockedHeight)
dockedHeight
- new heightpublic int getDockedWidth()
public int getDockedHeight()
public void setAutohideWidth(int w)
w
- new widthpublic void setAutohideHeight(int autohideHeight)
autohideHeight
- new heightpublic int getAutohideWidth()
public int getAutohideHeight()
public Rectangle getUndockedBounds()
public void setUndockedBounds(Rectangle undockedBounds)
undockedBounds
- new boundspublic int getDockID()
public void setDockID(int id)
Dockable
id
- new idpublic void resetDockID()
Dockable
public boolean isAvailable()
public void setAvailable(boolean available)
available
- true if to make the frame available. False to make it not available.public void setTitleBarComponent(JComponent component)
component
- title bar componentpublic JComponent getTitleBarComponent()
public void setTitleLabelComponent(JComponent component)
component
- title label componentpublic JComponent getTitleLabelComponent()
public AccessibleContext getAccessibleContext()
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.
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JComponent
AccessibleDockableFrame
that serves as the AccessibleContext
of this
DockableFrame
DockableFrame.AccessibleDockableFrame
public boolean isShowGripper()
public void setShowGripper(boolean showGripper)
showGripper
- true to show gripperpublic boolean isShowTitleBar()
public void setShowTitleBar(boolean showTitleBar)
showTitleBar
- true to show title bar.public boolean isShowContentPane()
public void setShowContentPane(boolean showContentPane)
showContentPane
- true to show the content pane .public boolean isMaximizable()
public void setMaximizable(boolean maximizable)
public boolean isNotified()
public void setNotified(boolean notified)
notified
- true to notify the frame. False to stop notify frame.protected boolean shouldNotify(FrameContainer frameContainer)
frameContainer
- the FrameContainer
protected NotificationFlasher createNotificationFlasher(AutoHideContainer autoHideContainer)
protected NotificationFlasher createNotificationFlasher(FrameContainer fc)
public boolean shouldVetoShowing()
public boolean shouldVetoHiding()
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.
public boolean shouldVetoRemoving()
Calling removeFrame method directly will not trigger this method.
public boolean isSlidingAutohide()
public void setSlidingAutohide(boolean slidingAutohide)
slidingAutohide
- true or false.isSlidingAutohide()
public void dispose()
public boolean isTransient()
setTransient(boolean)
public void setTransient(boolean isTransient)
isTransient
- true or false.public int getInitMode()
public void setInitMode(int initMode)
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.
initMode
- initial statepublic int getInitSide()
public void setInitSide(int initSide)
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.
initSide
- new initial side.public int getInitIndex()
public void setInitIndex(int initIndex)
initIndex
- the initial indexprotected PropertyChangeListener createFocusChangeListener()
public void addNotify()
addNotify
in class JComponent
public void removeNotify()
removeNotify
in class JComponent
public int getPreferredAutohideSide()
public void setPreferredAutohideSide(int preferredAutohideSide)
preferredAutohideSide
- preferred autohide side.public boolean isTabDockAllowed()
public void setTabDockAllowed(boolean tabDockAllowed)
tabDockAllowed
- true or false.public boolean isAlwaysStayInGroup()
isTabDockAllowed()
public void setAlwaysStayInGroup(boolean alwaysStayInGroup)
alwaysStayInGroup
- the flagpublic boolean isSideDockAllowed()
public void setSideDockAllowed(boolean sideDockAllowed)
sideDockAllowed
- true or false.protected String paramString()
paramString
in class JComponent
public Action getCloseAction()
setCloseAction(javax.swing.Action)
. If you
never set it, we will create DockableFrame.CloseAction
and use it.
public void setCloseAction(Action closeAction)
Property change event on PROPERTY_CLOSE_ACTION
will be fired.
closeAction
- the close action.public Action getHideAutohideAction()
public void setHideAutohideAction(Action hideAutohideAction)
Property change event on
PROPERTY_HIDE_AUTOHIDE_ACTION
will be fired.
hideAutohideAction
- the hide autohide action.public Action getFloatingAction()
setFloatingAction(javax.swing.Action)
. If
you never set it, we will create DockableFrame.FloatingAction
and use it.
public Action getFloatingAction(boolean single)
setFloatingAction(javax.swing.Action)
. If
you never set it, we will create DockableFrame.FloatingAction
and use it.
single
- if the menu item is triggered by a right mouse click on the tab, this flag will be true.
public void setFloatingAction(Action floatingAction)
Property change event on PROPERTY_FLOATING_ACTION
will be fired.
floatingAction
- the floating action.public Action getAutohideAction()
setAutohideAction(javax.swing.Action)
. If
you never set it, we will create DockableFrame.AutohideAction
and use it.
public void setAutohideAction(Action autohideAction)
Property change event on PROPERTY_AUTOHIDE_ACTION
will be fired.
autohideAction
- the autohide action.public Action getMaximizeAction()
setMaximizeAction(javax.swing.Action)
. If
you never set it, we will create DockableFrame.MaximizeAction
and use it.
public void setMaximizeAction(Action maximizeAction)
Property change event on PROPERTY_MAXIMIZE_ACTION
will be fired.
maximizeAction
- the maximize action.public Action getDockableAction()
setDockableAction(javax.swing.Action)
. If
you never set it, we will create DockableFrame.DockableAction
and use it.
public void setDockableAction(Action dockableAction)
Property change event on PROPERTY_DOCKABLE_ACTION
will be fired.
dockableAction
- the dockable action.public Action getCustomDoubleClickAction()
public void setCustomDoubleClickAction(Action customDoubleClickAction)
customDoubleClickAction
- the double click action on the title pane.public void setPreferredSize(Dimension preferredSize)
setPreferredSize
in class JComponent
public boolean isShowContextMenu()
public void setShowContextMenu(boolean showContextMenu)
showContextMenu
- true or false.protected boolean isDraggingTarget(MouseEvent e)
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.
e
- the MouseEvent
protected Component getDraggingTarget(MouseEvent e)
public int getDefaultEscapeAction()
ESCAPE_ACTION_TO_YIELD_FOCUS
, ESCAPE_ACTION_DO_NOTING
, ESCAPE_ACTION_TO_HIDE
, and ESCAPE_ACTION_TO_REMOVE
.
public void setDefaultEscapeAction(int defaultEscapeAction)
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
.public int getDefaultCloseAction()
CLOSE_ACTION_TO_HIDE
, and CLOSE_ACTION_TO_REMOVE
.
public void setDefaultCloseAction(int defaultCloseAction)
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
.public boolean isAutohideWhenActive()
public void setAutohideWhenActive(boolean autohideWhenActive)
autohideWhenActive
- true or false.public int[] getButtonsOrder()
public void setButtonsOrder(int[] buttonsOrder)
BUTTON_CLOSE
, BUTTON_AUTOHIDE
, BUTTON_HIDE_AUTOHIDE
, BUTTON_FLOATING
, and BUTTON_MAXIMIZE
. The order is from right to left.
buttonsOrder
- the buttons order.@Deprecated public boolean isActivateAfterSliding()
@Deprecated public void addAdditionalButtonActions(Action action, Icon icon)
addAdditionalButtonActions(javax.swing.Action)
action
- the action for the button, the icon and tooltip are taken from hereicon
- the icon of the buttonpublic void addAdditionalButtonActions(Action action)
action
- the action for the button, the icon and tooltip are taken from herepublic void removeAdditionalButtonActions(Action action)
action
- the action for the button to be removedpublic Icon getActionIcon(Action action)
action
- the action
public List<Action> getAdditionalButtonActions()
public void setTabBackground(Color background)
background
- the background colorpublic Color getTabBackground()
TabColorProvider
getTabBackground
in interface TabColorProvider
public void setTabForeground(Color foreground)
foreground
- the foreground colorpublic Color getTabForeground()
TabColorProvider
getTabForeground
in interface TabColorProvider
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |