|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.geom.RectangularShape | +--java.awt.geom.Rectangle2D | +--java.awt.Rectangle | +--org.tigris.toolbar.layouts.DockBoundary
Abstract Rectangle class for representing the bounds of the docked toolbars at a given edge.
Field Summary |
---|
Fields inherited from class java.awt.Rectangle |
---|
height, width, x, y |
Fields inherited from class java.awt.geom.Rectangle2D |
---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
Constructor Summary | |
---|---|
DockBoundary(int edge)
Creates a DockBoundary for the specified edge. |
|
DockBoundary(int edge,
int spacing)
Creates a DockBoundary for the specified edge with the specified spacing. |
Method Summary | |
---|---|
void |
addToolBar(javax.swing.JToolBar toolbar,
int rowIndex,
int index)
Inserts the specified toolbar into this boundary at the provided indices. |
void |
addToolBar(javax.swing.JToolBar toolbar,
java.awt.Point dropPoint)
Adds the specified toolbar to this boundary calculating the insertion index based on the provided drop point. |
boolean |
containsToolBar(javax.swing.JToolBar toolbar)
Returns a boolean indicating whether or not this boundary contains the provided toolbar. |
int |
getDepth()
Returns the height or width of this boundary depending on orientation as determined by a previous call to validate. |
abstract int |
getDockIndex(javax.swing.JToolBar toolbar)
Subclass implementation should return the index at which the specified toolbar is located within this boundary, or -1 if the toolbar is not present. |
abstract int |
getDockIndex(java.awt.Point p)
Subclass implementations should return the index at which the toolbar should be added when dropped at this point. |
int |
getEdge()
Gets the edge that this boundary represents. |
int |
getOrientation()
Gets the orientation of this edge. |
protected int |
getPreferredToolBarDepth(javax.swing.JToolBar toolbar)
Returns the "depth" (height or width) of the provided toolbar depending on this boundary's orientation. |
protected int |
getPreferredToolBarLength(javax.swing.JToolBar toolbar)
Returns the "length" (width or height) of the provided toolbar depending on this boundary's orientation. |
abstract int |
getRowIndex(javax.swing.JToolBar toolbar)
Subclass implementation should return the row index at which the specified toolbar is located within this boundary, or -1 if the toolbar is not present. |
abstract int |
getRowIndex(java.awt.Point p)
Subclass implementations should return the row index at which the toolbar should be added when dropped at this point. |
int |
getSpacing()
Gets the spacing between toolbars added to this edge. |
javax.swing.JToolBar[] |
getToolBars()
Gets an array of the toolbars registered with this boundary. |
boolean |
isDockablePoint(java.awt.Point p)
Determines if the provided point is within the dockable range for this edge. |
boolean |
isDraggablePoint(java.awt.Point p,
javax.swing.JToolBar toolbar)
Determines if a drag operation on the provided toolbar at the provided point may begin or continue. |
protected void |
mirrorBounds(java.awt.Rectangle r,
int mirrorOffset)
Reflects the provided rectangle about a line passing through the point at the provided offset distance depending on the orientation of this boundary. |
void |
removeComponent(java.awt.Component component)
Removes the specified component from this boundary as long as the runtime type of the component is a JToolBar. |
void |
removeToolBar(javax.swing.JToolBar toolbar)
Removes the specified toolbar from this boundary. |
void |
revalidate()
Validates this boundary and recalculates its dockable range. |
protected void |
setDepth(int depth)
Sets the height or width of this boundary depending on orientation. |
void |
setPosition(int newX,
int newY,
int length)
Sets the location and length of this boundary, and calculates the bounds based on validating the toolbar layout. |
void |
setSpacing(int spacing)
Sets the spacing between toolbars added to this edge. |
protected void |
toolBarAdded(javax.swing.JToolBar toolbar,
int rowIndex,
int index)
Callback method called when a toolbar is added to the boundary in order to allow subclasses to provide additional handling. |
protected void |
toolBarRemoved(javax.swing.JToolBar toolbar)
Callback method called when a toolbar is removed from the boundary in order to allow the subclass to provide additional handling. |
abstract void |
validate()
Lays out the toolbars associated with this boundary and calculates the depth of the boundary based on the toolbar layout. |
Methods inherited from class java.awt.Rectangle |
---|
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union |
Methods inherited from class java.awt.geom.Rectangle2D |
---|
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union |
Methods inherited from class java.awt.geom.RectangularShape |
---|
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.Shape |
---|
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects |
Constructor Detail |
public DockBoundary(int edge)
public DockBoundary(int edge, int spacing)
Method Detail |
public void setSpacing(int spacing)
public int getSpacing()
public int getOrientation()
public int getEdge()
public boolean isDockablePoint(java.awt.Point p)
public boolean isDraggablePoint(java.awt.Point p, javax.swing.JToolBar toolbar)
public abstract int getDockIndex(java.awt.Point p)
public abstract int getDockIndex(javax.swing.JToolBar toolbar)
public abstract int getRowIndex(java.awt.Point p)
public abstract int getRowIndex(javax.swing.JToolBar toolbar)
public void setPosition(int newX, int newY, int length)
public abstract void validate()
public void revalidate()
public int getDepth()
protected void setDepth(int depth)
public void addToolBar(javax.swing.JToolBar toolbar, int rowIndex, int index)
public void addToolBar(javax.swing.JToolBar toolbar, java.awt.Point dropPoint)
protected void toolBarAdded(javax.swing.JToolBar toolbar, int rowIndex, int index)
public void removeToolBar(javax.swing.JToolBar toolbar)
public void removeComponent(java.awt.Component component)
protected void toolBarRemoved(javax.swing.JToolBar toolbar)
public javax.swing.JToolBar[] getToolBars()
public boolean containsToolBar(javax.swing.JToolBar toolbar)
protected int getPreferredToolBarLength(javax.swing.JToolBar toolbar)
protected int getPreferredToolBarDepth(javax.swing.JToolBar toolbar)
protected void mirrorBounds(java.awt.Rectangle r, int mirrorOffset)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |