Package com.jidesoft.swing
Interface IContour
-
- All Known Implementing Classes:
Contour
public interface IContourAContouris a lightweight component which only paints the outline of component when dragged. It is also used as a placeholder for some information during dragging. UsuallyContouris added toJLayeredPaneof aRootPaneContainerso that it looks like floating above other windows. Notes: this class has to be public so that JIDE can use it in different packages, not meant to release to end user as a public API. JIDE will not guarantee the class will remain as it is.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanup()java.awt.ComponentgetAttachedComponent()Gets the attached component of this contour.intgetAttachedSide()Gets the side of the attached component which the contour is attached to.java.awt.RectanglegetBounds()java.awt.ComponentgetGlassPane()java.awt.ContainergetRelativeContainer()javax.swing.JComponentgetSaveDraggedComponent()Gets saved dragged component before the contour is hidden.intgetSaveMouseModifier()Gets saved mouse modifier before the contour is hidden.intgetSaveX()Gets saved X position of contour before it's hidden.intgetSaveY()Gets saved Y position of contour before it's hidden.intgetTabHeight()intgetTabSide()Gets the side of the tab.booleanisAllowDocking()Checks if docking is allowed.booleanisFloating()Returns true if the contour is in floating mode.booleanisLightweight()booleanisSingle()When you dragged a component, several other components could be dragged.booleanisTabDocking()Returns true if the contour is in tab-dock mode.booleanisVisible()Determines whether this component should be visible when its parent is visible.voidsetAllowDocking(boolean allowDocking)Sets the value of docking.voidsetAttachedComponent(java.awt.Component attachedComponent)Sets the attached components.voidsetAttachedSide(int attachedSide)Sets the side of the attached component which the contour is attached to.voidsetBounds(int x, int y, int width, int height)voidsetBounds(java.awt.Rectangle r)voidsetChangeCursor(boolean changeCursor)voidsetDraggingInformation(javax.swing.JComponent comp, int saveX, int saveY, int saveMouseModifier)Stores information before the contour is hidden.voidsetFloating(boolean floating)Sets the floating mode.voidsetGlassPane(java.awt.Component glassPane)voidsetRelativeContainer(java.awt.Container relativeContainer)voidsetSingle(boolean single)Sets the value of single.voidsetTabDocking(boolean tabDocking)Sets the tab-docking mode.voidsetTabHeight(int tabHeight)Sets the tab height.voidsetTabSide(int tabSide)Sets the side of the tab.voidsetVisible(boolean aFlag)Makes the component visible or invisible.
-
-
-
Method Detail
-
getBounds
java.awt.Rectangle getBounds()
-
isLightweight
boolean isLightweight()
-
setBounds
void setBounds(java.awt.Rectangle r)
-
setBounds
void setBounds(int x, int y, int width, int height)
-
getTabHeight
int getTabHeight()
-
setTabHeight
void setTabHeight(int tabHeight)
Sets the tab height.- Parameters:
tabHeight-
-
isTabDocking
boolean isTabDocking()
Returns true if the contour is in tab-dock mode.- Returns:
- true if tab-docking; false otherwise
-
setTabDocking
void setTabDocking(boolean tabDocking)
Sets the tab-docking mode.- Parameters:
tabDocking- new mode
-
getTabSide
int getTabSide()
Gets the side of the tab.- Returns:
- the side of the tab
-
setTabSide
void setTabSide(int tabSide)
Sets the side of the tab.- Parameters:
tabSide-
-
isFloating
boolean isFloating()
Returns true if the contour is in floating mode.- Returns:
- true if floating; false otherwise
-
setFloating
void setFloating(boolean floating)
Sets the floating mode.- Parameters:
floating- new mode
-
getAttachedComponent
java.awt.Component getAttachedComponent()
Gets the attached component of this contour.- Returns:
- the attached component
-
setAttachedComponent
void setAttachedComponent(java.awt.Component attachedComponent)
Sets the attached components.- Parameters:
attachedComponent- attached component to be set
-
getAttachedSide
int getAttachedSide()
Gets the side of the attached component which the contour is attached to.- Returns:
- side the attached side
-
setAttachedSide
void setAttachedSide(int attachedSide)
Sets the side of the attached component which the contour is attached to.- Parameters:
attachedSide- the new attached side to be set
-
isSingle
boolean isSingle()
When you dragged a component, several other components could be dragged. For example, if user drags on title bar of FrameContainer, all components in the FrameContainer are considered as dragged. If user drags on tab, only selected one is dragged.- Returns:
trueif all dragged components are affected;falseotherwise.
-
setSingle
void setSingle(boolean single)
Sets the value of single.- Parameters:
single-trueif all dragged components are affected;falseotherwise.
-
isAllowDocking
boolean isAllowDocking()
Checks if docking is allowed.- Returns:
trueif docking is allowed;falseotherwise.
-
setAllowDocking
void setAllowDocking(boolean allowDocking)
Sets the value of docking.- Parameters:
allowDocking-trueif docking is allowed;falseotherwise.
-
getRelativeContainer
java.awt.Container getRelativeContainer()
-
setRelativeContainer
void setRelativeContainer(java.awt.Container relativeContainer)
-
getSaveX
int getSaveX()
Gets saved X position of contour before it's hidden.- Returns:
- saved X position
-
getSaveY
int getSaveY()
Gets saved Y position of contour before it's hidden.- Returns:
- saved Y position
-
getSaveMouseModifier
int getSaveMouseModifier()
Gets saved mouse modifier before the contour is hidden.- Returns:
- saved mouse modifier
-
getSaveDraggedComponent
javax.swing.JComponent getSaveDraggedComponent()
Gets saved dragged component before the contour is hidden.- Returns:
- saved dragged component
-
setDraggingInformation
void setDraggingInformation(javax.swing.JComponent comp, int saveX, int saveY, int saveMouseModifier)Stores information before the contour is hidden. Those information will be used to restore when the contour is set visible again.- Parameters:
comp- the dragged componentsaveX- X position of the contoursaveY- Y position of the contoursaveMouseModifier- mouse modifier in the MouseEvent
-
cleanup
void cleanup()
-
setVisible
void setVisible(boolean aFlag)
Makes the component visible or invisible. OverridesComponent.setVisible.- Parameters:
aFlag- true to make the component visible; false to make it invisible
-
isVisible
boolean isVisible()
Determines whether this component should be visible when its parent is visible. Components are initially visible, with the exception of top level components such asFrameobjects.- Returns:
trueif the component is visible,falseotherwise- Since:
- JDK1.0
- See Also:
setVisible(boolean)
-
setGlassPane
void setGlassPane(java.awt.Component glassPane)
-
getGlassPane
java.awt.Component getGlassPane()
-
setChangeCursor
void setChangeCursor(boolean changeCursor)
-
-