|
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.swing.Contour
public class Contour
A Contour
is a lightweight component which only paints the outline of component when dragged. It is also
used as a placeholder for some information during dragging.
Nested Class Summary |
---|
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 | |
---|---|
static int |
FULL_OUTLINE_MODE
|
static int |
MIX_OUTLINE_MODE
|
static int |
PARTIAL_OUTLINE_MODE
|
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 | |
---|---|
Contour()
Default Constructor. |
|
Contour(int tabHeight)
Constructor with tab height. |
Method Summary | |
---|---|
void |
cleanup()
|
Component |
getAttachedComponent()
Gets the attached component of this contour. |
int |
getAttachedSide()
Gets the side of the attached component which the contour is attached to. |
Component |
getGlassPane()
|
int |
getOutlineMode()
|
Container |
getRelativeContainer()
|
JComponent |
getSaveDraggedComponent()
Gets saved dragged component before the contour is hidden. |
int |
getSaveMouseModifier()
Gets saved mouse modifier before the contour is hidden. |
int |
getSaveX()
Gets saved X position of contour before it's hidden. |
int |
getSaveY()
Gets saved Y position of contour before it's hidden. |
int |
getTabHeight()
Gets tab height. |
int |
getTabSide()
Gets the side of the tab. |
boolean |
isAllowDocking()
Checks if docking is allowed. |
boolean |
isChangeCursor()
|
boolean |
isDoubleBuffered()
Returns whether this component should use a buffer to paint. |
boolean |
isFloating()
Returns true if the contour is in floating mode. |
boolean |
isSingle()
When you dragged a component, several other components could be dragged. |
boolean |
isTabDocking()
Returns true if the contour is in tab-dock mode. |
boolean |
isVisible()
Determines whether this component should be visible when its parent is visible. |
void |
paint(Graphics g)
Paint a rectangle or tab-shape using DOTTED_STROKE |
void |
setAllowDocking(boolean allowDocking)
Sets the value of docking. |
void |
setAttachedComponent(Component attachedComponent)
Sets the attached components. |
void |
setAttachedSide(int attachedSide)
Sets the side of the attached component which the contour is attached to. |
void |
setBounds(int x,
int y,
int width,
int height)
Overwrite setBounds so that width and height are always even. |
void |
setBounds(Rectangle r)
Overwrite setBounds so that width and height are always even. |
void |
setChangeCursor(boolean changeCursor)
|
void |
setDraggingInformation(JComponent comp,
int saveX,
int saveY,
int saveMouseModifier)
Stores information before the contour is hidden. |
void |
setFloating(boolean floating)
Sets the floating mode. |
void |
setGlassPane(Component glassPane)
|
void |
setOutlineMode(int outlineMode)
|
void |
setRelativeContainer(Container relativeContainer)
|
void |
setSingle(boolean single)
Sets the value of single. |
void |
setTabDocking(boolean tabDocking)
Sets the tab-docking mode. |
void |
setTabHeight(int tabHeight)
Sets the tab height. |
void |
setTabSide(int tabSide)
Sets the side of the tab. |
void |
setVisible(boolean aFlag)
Makes the component visible or invisible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jidesoft.swing.IContour |
---|
getBounds, isLightweight |
Field Detail |
---|
public static final int PARTIAL_OUTLINE_MODE
public static final int MIX_OUTLINE_MODE
public static final int FULL_OUTLINE_MODE
Constructor Detail |
---|
public Contour()
public Contour(int tabHeight)
tabHeight
- the tab heightMethod Detail |
---|
public boolean isDoubleBuffered()
isDoubleBuffered
in class JComponent
public void paint(Graphics g)
DOTTED_STROKE with width of WIDTH.
- Overrides:
paint
in class JComponent
- Parameters:
g
-
public void setBounds(Rectangle r)
setBounds
in interface IContour
setBounds
in class Component
r
- the new bounding rectangle for this componentpublic void setBounds(int x, int y, int width, int height)
DOTTED_STROKE
setBounds
in interface IContour
setBounds
in class Component
x
- the new x-coordinate of this componenty
- the new y-coordinate of this componentwidth
- the new width
of this componentheight
- the new height
of this componentpublic int getTabHeight()
getTabHeight
in interface IContour
public void setTabHeight(int tabHeight)
setTabHeight
in interface IContour
tabHeight
- public boolean isTabDocking()
isTabDocking
in interface IContour
public void setTabDocking(boolean tabDocking)
setTabDocking
in interface IContour
tabDocking
- new modepublic int getTabSide()
getTabSide
in interface IContour
public void setTabSide(int tabSide)
setTabSide
in interface IContour
tabSide
- public boolean isFloating()
isFloating
in interface IContour
public void setFloating(boolean floating)
setFloating
in interface IContour
floating
- new modepublic Component getAttachedComponent()
getAttachedComponent
in interface IContour
public void setAttachedComponent(Component attachedComponent)
setAttachedComponent
in interface IContour
attachedComponent
- attached component to be setpublic int getAttachedSide()
getAttachedSide
in interface IContour
public void setAttachedSide(int attachedSide)
setAttachedSide
in interface IContour
attachedSide
- the new attached side to be setpublic boolean isSingle()
isSingle
in interface IContour
true
if all dragged components are affected; false
otherwise.public void setSingle(boolean single)
setSingle
in interface IContour
single
- true
if all dragged components are affected; false
otherwise.public boolean isAllowDocking()
isAllowDocking
in interface IContour
true
if docking is allowed; false
otherwise.public void setAllowDocking(boolean allowDocking)
setAllowDocking
in interface IContour
allowDocking
- true
if docking is allowed; false
otherwise.public Container getRelativeContainer()
getRelativeContainer
in interface IContour
public void setRelativeContainer(Container relativeContainer)
setRelativeContainer
in interface IContour
public int getSaveX()
getSaveX
in interface IContour
public int getSaveY()
getSaveY
in interface IContour
public int getSaveMouseModifier()
getSaveMouseModifier
in interface IContour
public JComponent getSaveDraggedComponent()
getSaveDraggedComponent
in interface IContour
public void setDraggingInformation(JComponent comp, int saveX, int saveY, int saveMouseModifier)
setDraggingInformation
in interface IContour
comp
- the dragged componentsaveX
- X position of the contoursaveY
- Y position of the contoursaveMouseModifier
- mouse modifier in the MouseEventpublic void cleanup()
cleanup
in interface IContour
public void setVisible(boolean aFlag)
Component.setVisible
.
setVisible
in interface IContour
setVisible
in class JComponent
aFlag
- true to make the component visible; false to make it invisiblepublic boolean isVisible()
Frame
objects.
isVisible
in interface IContour
isVisible
in class Component
true
if the component is visible, false
otherwisesetVisible(boolean)
public int getOutlineMode()
public void setOutlineMode(int outlineMode)
public Component getGlassPane()
getGlassPane
in interface IContour
public void setGlassPane(Component glassPane)
setGlassPane
in interface IContour
public boolean isChangeCursor()
public void setChangeCursor(boolean changeCursor)
setChangeCursor
in interface IContour
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |