public class DefaultFlapWindow extends java.lang.Object implements FlapWindow, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
FlapDockStation
. The window shows one Dockable
Modifier and Type | Class and Description |
---|---|
static class |
DefaultFlapWindow.DialogParent
A parent of a
DefaultFlapWindow that is a JDialog . |
static interface |
DefaultFlapWindow.Parent
The parent container of a
DefaultFlapWindow . |
Constructor and Description |
---|
DefaultFlapWindow(FlapDockStation station,
ButtonPane buttonPane,
DefaultFlapWindow.Parent window)
Constructs a new window.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsScreenPoint(java.awt.Point point)
Tells whether this window contains
point which is a
point of the screen. |
void |
destroy()
Informs this window that it is no longer used by its owner
and will never be used again.
|
protected void |
discardDisplayer()
Replaces the current
DockableDisplayer with a new instance. |
java.awt.Component |
getComponent()
Gets the root
Component of this FlapWindow |
DockableDisplayer |
getDisplayer()
Gets the displayer used to show a
Dockable . |
protected java.awt.Container |
getDisplayerParent()
Gets the container that will become the parent of a
DockableDisplayer . |
Dockable |
getDockable()
Gets the
Dockable which is shown on this window. |
java.awt.Insets |
getDockableInsets()
Makes a guess how big the insets around the current
Dockable
of this window are. |
DockTitle |
getDockTitle()
Gets the title which is currently displayed
|
FlapDockStation |
getStation()
Gets the station for which this window is shown.
|
java.awt.Rectangle |
getWindowBounds()
Gets the current boundaries of this window in screen coordinates.
|
boolean |
isWindowValid()
Tells whether this window is still valid, e.g whether the window can be shown
in front of its station.
|
boolean |
isWindowVisible()
Tells whether this window is shown or hidden.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
repaint()
Tells this window that is should redraw its entire content.
|
void |
setController(DockController controller)
Informs this
FlapWindow about the DockController in whose realm |
void |
setDockable(Dockable dockable)
Sets the
Dockable which will be shown on this window. |
void |
setDockTitle(DockTitleVersion title)
Sets the title which should be displayed.
|
void |
setDropInfo(FlapDropInfo dropInfo)
Sets information where a
Dockable will be dropped. |
void |
setRemoval(boolean removal)
Tells this window whether a drag and drop operation is currently removing its child.
|
void |
setWindowVisible(boolean flag)
Shows or hides this window.
|
void |
updateBounds()
Recalculates the size and the location of this window.
|
public DefaultFlapWindow(FlapDockStation station, ButtonPane buttonPane, DefaultFlapWindow.Parent window)
station
- the station which manages this windowbuttonPane
- the buttons on the stationwindow
- the window on which to paint this DefaultFlapWindow
public void setWindowVisible(boolean flag)
FlapWindow
setWindowVisible
in interface FlapWindow
flag
- whether to show this windowpublic boolean isWindowVisible()
FlapWindow
isWindowVisible
in interface FlapWindow
true
if the window is shownpublic java.awt.Rectangle getWindowBounds()
FlapWindow
getWindowBounds
in interface FlapWindow
public void destroy()
FlapWindow
destroy
in interface FlapWindow
public void repaint()
FlapWindow
repaint
in interface FlapWindow
public java.awt.Component getComponent()
FlapWindow
Component
of this FlapWindow
getComponent
in interface FlapWindow
null
after FlapWindow.destroy()
was calledpublic boolean isWindowValid()
public boolean containsScreenPoint(java.awt.Point point)
FlapWindow
point
which is a
point of the screen.containsScreenPoint
in interface FlapWindow
point
- a point on the screentrue
if this window contains point
public FlapDockStation getStation()
public void setDropInfo(FlapDropInfo dropInfo)
Dockable
will be dropped.setDropInfo
in interface FlapWindow
dropInfo
- the information or null
public void setRemoval(boolean removal)
FlapWindow
setRemoval
in interface FlapWindow
removal
- whether the child of this window is removedpublic void setDockTitle(DockTitleVersion title)
setDockTitle
in interface FlapWindow
title
- the title or null
public DockTitle getDockTitle()
getDockTitle
in interface FlapWindow
null
public Dockable getDockable()
Dockable
which is shown on this window.getDockable
in interface FlapWindow
Dockable
or null
public DockableDisplayer getDisplayer()
Dockable
.getDisplayer
in interface FlapWindow
null
public void setDockable(Dockable dockable)
Dockable
which will be shown on this window.setDockable
in interface FlapWindow
dockable
- The Dockable
or null
protected void discardDisplayer()
DockableDisplayer
with a new instance.protected java.awt.Container getDisplayerParent()
DockableDisplayer
.public void setController(DockController controller)
FlapWindow
FlapWindow
about the DockController
in whose realmsetController
in interface FlapWindow
controller
- the controller or null
public java.awt.Insets getDockableInsets()
Dockable
of this window are.getDockableInsets
in interface FlapWindow
public void updateBounds()
updateBounds
in interface FlapWindow
FlapDockStation.getWindowSize(Dockable)
,
FlapDockStation.getWindowMinSize()
,
FlapDockStation.getExpansionBounds()
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener