|
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 javax.swing.JPanel com.jidesoft.swing.NullPanel com.jidesoft.status.StatusBarItem com.jidesoft.status.LabelStatusBarItem com.jidesoft.status.ResizeStatusBarItem
public class ResizeStatusBarItem
A status bar item which can be used as resizable corner. You should always add it as the last status bar item on status bar as it will serve as a resizable target which user can drag it to resize the top level window. You probably shouldn't use it if the status bar is not used at the bottom of the top level window because it doesn't make sense to have a resizable target which is not at the bottom-right corner of the resizable window.
Please note, if user uses ResizeStatusBarItem to resize the top level window, the resizing operation is not done via native code any more. So it flickers a lot on any JDK before JDK1.6 because of missing the double buffering feature. To make it feels better, we added a methodsetStopRepaintDuringResizing(boolean)
. If set to true, repaint
event will be blocked, thus you won't see any flickerings. However, the content of the window is not shown either
during resizing. There is better than flickering but still not as good as resizing using window's resize border. We
just couldn't find a better way to do it yet. By default, we set it false if JDK is 1.6 and above, and true
otherwise. Since JDK1.6 has the double buffer which reduces flickering a lot during resizing, it actually feels
better when set to false.
Nested Class Summary | |
---|---|
class |
ResizeStatusBarItem.ResizableMouseInputAdapter
Mouse input listenr to control the resizing of Resizable component. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ResizeStatusBarItem()
Creates a resize status bar item. |
|
ResizeStatusBarItem(boolean resizeTopLevelAncestor)
Creates a resize status bar item. |
|
ResizeStatusBarItem(String name)
Creates a resize status bar item. |
|
ResizeStatusBarItem(String name,
boolean resizeTopLevelAncestor)
|
Method Summary | |
---|---|
protected void |
configureLabel(JLabel label)
Configures the label. |
protected JLabel |
createLabel()
Creates the label component used by LabelStatusBarItem. |
protected boolean |
isResizable()
Checks if the status bar item should show resizable corner. |
void |
setStopRepaintDuringResizing(boolean stopRepaintDuringResizing)
Sets to true if you want to stop repaint event during resizing. |
Methods inherited from class com.jidesoft.status.LabelStatusBarItem |
---|
addMouseListener, getComponent, getHorizontalAlignment, getIcon, getItemName, getPreferredSize, getText, getToolTipLocation, getToolTipText, setAlignment, setEnabled, setHorizontalAlignment, setIcon, setText, setToolTip, setToolTipText |
Methods inherited from class com.jidesoft.status.StatusBarItem |
---|
getPreferredWidth, setPreferredWidth, updateUI |
Methods inherited from class com.jidesoft.swing.NullPanel |
---|
setBackground, setFont, setForeground |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResizeStatusBarItem()
public ResizeStatusBarItem(String name)
name
- the name of this status bar item.public ResizeStatusBarItem(boolean resizeTopLevelAncestor)
resizeTopLevelAncestor
- if true, pressing on the component and dragging will resize the top level
ancestor.public ResizeStatusBarItem(String name, boolean resizeTopLevelAncestor)
name
- the name of this status bar item.resizeTopLevelAncestor
- If true, pressing on the component and dragging will resize the top level ancestor.
If false, this component is simply an indicator to indicate top level ancestor is
resizable. User still needs to press and drag and border of top level ancestor to
resize.Method Detail |
---|
protected JLabel createLabel()
createLabel
in class LabelStatusBarItem
protected void configureLabel(JLabel label)
LabelStatusBarItem
configureLabel
in class LabelStatusBarItem
protected boolean isResizable()
Frame
, it will
return true only when Frame.getExtendedState()
return Frame.NORMAL
. If the top level ancestor is
not a Frame, it will always return true as there isn't enough information to determine it is resizable or not.
public void setStopRepaintDuringResizing(boolean stopRepaintDuringResizing)
stopRepaintDuringResizing
-
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |