public class TabDisplayerCombinerTarget extends Object implements DisplayerCombinerTarget
DisplayerCombinerTarget can be used by DockableDisplayers that show a
StackDockComponent to paint some tabs. This target will create a StackDockStation
if execute(CombinerSource) is called.isValid() to check whether
the parameters were valid.| Constructor and Description |
|---|
TabDisplayerCombinerTarget(DockableDisplayer displayer,
StackDockComponent stack,
CombinerSource source,
Enforcement force)
Creates a new target, clients should call
isValid() to check whether the new target can
be executed. |
| Modifier and Type | Method and Description |
|---|---|
Dockable |
execute(CombinerSource source)
Executes this operation.
|
int |
getIndex()
Gets the location where the
Dockable would be inserted |
Dockable |
getTarget()
Gets the
Dockable over which the new item would be dragged. |
boolean |
isValid() |
void |
paint(Graphics g,
Component component,
StationPaint paint,
Rectangle stationBounds,
Rectangle dockableBounds)
Allows this operation to paint some markings onto the screen.
|
void |
paint(Graphics g,
StationPaint paint) |
public TabDisplayerCombinerTarget(DockableDisplayer displayer, StackDockComponent stack, CombinerSource source, Enforcement force)
isValid() to check whether the new target can
be executed.public boolean isValid()
public int getIndex()
Dockable would be insertedpublic Dockable getTarget()
Dockable over which the new item would be dragged.Dockable, not nullpublic Dockable execute(CombinerSource source)
DisplayerCombinerTargetDockStation.drag(Dockable).execute in interface DisplayerCombinerTargetsource - the source of information to use for the execution, this may not be the same object as was used to create
this DisplayerCombinerTarget.Dockable for the old itempublic void paint(Graphics g, Component component, StationPaint paint, Rectangle stationBounds, Rectangle dockableBounds)
DisplayerCombinerTargetpaint in interface DisplayerCombinerTargetg - the graphics context to usecomponent - the component on which g paints.paint - painting algorithms fitting to the current DockThemestationBounds - an estimate of the area which will be affected by inserting
the combined Dockable, not nulldockableBounds - the boundaries which a representation of the combined Dockable
has. If possible this is the exact location and size, including any title. If the
station cannot exactly tell where the Dockable is going to be
(e.g. when CombinerSource.getSize() returned null), then
this may be the location and size of a title. Never null.public void paint(Graphics g, StationPaint paint)
Copyright © 2017 Docking Frames. All rights reserved.