|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.drag.painter.RectangleDragComponentFactory
public class RectangleDragComponentFactory
This factory creates a javax.swing.JComponent to represent the dragged dockable.
The javax.swing.JComponent uses a RectanglePainter
to paint the
dragged dockable.
Constructor Summary | |
---|---|
RectangleDragComponentFactory(RectanglePainter rectanglePainter)
Constructs a rectangle drag component factory that uses the given painter for painting the rectangles on the javax.swing.JComponent. |
|
RectangleDragComponentFactory(RectanglePainter rectanglePainter,
boolean drawLabel)
Constructs a rectangle drag component factory that uses the given painter for painting the rectangles on the javax.swing.JComponent. |
Method Summary | |
---|---|
java.awt.Component |
createDragComponent(Dockable dockable,
Dock dock,
java.awt.Rectangle rectangle)
Creates a component to show where a dockable will be docked in a dock while dragging the dockable. |
RectanglePainter |
getRectanglePainter()
Gets the painter that paints the rectangles on the javax.swing.JComponents returned by this factory. |
boolean |
isDrawLabel()
Determines if a label has to be painted on the rectangle. |
void |
setDrawLabel(boolean drawLabel)
Sets if a label has to be painted on the rectangle. |
void |
setRectanglePainter(RectanglePainter rectanglePainter)
Sets the painter that paints the rectangles on the javax.swing.JComponents returned by this factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RectangleDragComponentFactory(RectanglePainter rectanglePainter)
rectanglePainter
- The painter that paints the rectangles on the javax.swing.JComponents returned by this factory.public RectangleDragComponentFactory(RectanglePainter rectanglePainter, boolean drawLabel)
rectanglePainter
- The painter that paints the rectangles on the javax.swing.JComponents returned by this factory.drawLabel
- True when a label has to be painted on the rectangle.Method Detail |
---|
public java.awt.Component createDragComponent(Dockable dockable, Dock dock, java.awt.Rectangle rectangle)
DragComponentFactory
createDragComponent
in interface DragComponentFactory
dockable
- The dragged dockable.dock
- The dock in which the dockable will be docked, if the mouse is released in the current position.rectangle
- The rectangle relative to the dock that represents the window for the dockable,
if the mouse is released in the current position.
public RectanglePainter getRectanglePainter()
public void setRectanglePainter(RectanglePainter rectanglePainter)
rectanglePainter
- The painter that paints the rectangles on the JComponents returned by this factory.public boolean isDrawLabel()
public void setDrawLabel(boolean drawLabel)
drawLabel
- True when a label has to be painted on the rectangle.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |