bibliothek.gui.dock.station.screen
Class ScreenDockProperty

java.lang.Object
  extended by bibliothek.gui.dock.layout.AbstractDockableProperty
      extended by bibliothek.gui.dock.station.screen.ScreenDockProperty
All Implemented Interfaces:
DockableProperty

public class ScreenDockProperty
extends AbstractDockableProperty

This property is used on ScreenDockStations to determine the bounds of the dialogs.

Author:
Benjamin Sigg

Constructor Summary
ScreenDockProperty()
          Constructs a new property
ScreenDockProperty(int x, int y, int width, int height)
          Constructs a new property
ScreenDockProperty(int x, int y, int width, int height, Path placeholder)
          Constructs a new property
ScreenDockProperty(int x, int y, int width, int height, Path placeholder, boolean fullscreen)
          Constructs a new property
 
Method Summary
 ScreenDockProperty copy()
          Gets a copy of this property, the successor must be copied as well.
 boolean equals(Object obj)
           
 String getFactoryID()
          Gets the unique name of the DockablePropertyFactory which can create this type of DockableProperty.
 int getHeight()
          Gets the height of the dialog.
 Path getPlaceholder()
          Gets the name of this location.
 int getWidth()
          Gets the width of the dialog.
 int getX()
          Gets the x-coordinate of the dialog.
 int getY()
          Gets the y-coordinate of the dialog
 int hashCode()
           
 boolean isFullscreen()
          Tells whether this location describes an element that is in fullscreen mode.
 void load(DataInputStream in)
          Reads the contents of this DockableProperty from a stream.
 void load(XElement element)
          Reads the contents of this DockableProperty from an xml element.
 void setFullscreen(boolean fullscreen)
          Sets the fullscreen mode
 void setHeight(int height)
          Sets the height of the dialog.
 void setPlaceholder(Path placeholder)
          Sets the name of this location.
 void setWidth(int width)
          Sets the width of the dialog.
 void setX(int x)
          Sets the location of the left size of the dialog.
 void setY(int y)
          Sets the location of the top side of the dialog.
 void store(DataOutputStream out)
          Stores the contents of this DockableProperty in a stream.
 void store(XElement element)
          Stores the contents of this property as xml element.
 String toString()
           
 
Methods inherited from class bibliothek.gui.dock.layout.AbstractDockableProperty
copy, equalsNoSuccessor, getSuccessor, setSuccessor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScreenDockProperty

public ScreenDockProperty()
Constructs a new property


ScreenDockProperty

public ScreenDockProperty(int x,
                          int y,
                          int width,
                          int height)
Constructs a new property

Parameters:
x - the x-coordinate of the dialog
y - the y-coordinate of the dialog
width - the width of the dialog
height - the height of the dialog

ScreenDockProperty

public ScreenDockProperty(int x,
                          int y,
                          int width,
                          int height,
                          Path placeholder)
Constructs a new property

Parameters:
x - the x-coordinate of the dialog
y - the y-coordinate of the dialog
width - the width of the dialog
height - the height of the dialog
placeholder - the name of this location, can be null

ScreenDockProperty

public ScreenDockProperty(int x,
                          int y,
                          int width,
                          int height,
                          Path placeholder,
                          boolean fullscreen)
Constructs a new property

Parameters:
x - the x-coordinate of the dialog
y - the y-coordinate of the dialog
width - the width of the dialog
height - the height of the dialog
placeholder - the name of this property, can be null
fullscreen - if set, then the window should actually be in fullscreen mode
Method Detail

getFactoryID

public String getFactoryID()
Description copied from interface: DockableProperty
Gets the unique name of the DockablePropertyFactory which can create this type of DockableProperty.

Returns:
the id
See Also:
DockablePropertyFactory

copy

public ScreenDockProperty copy()
Description copied from interface: DockableProperty
Gets a copy of this property, the successor must be copied as well.

Returns:
an independent copy of this

store

public void store(DataOutputStream out)
           throws IOException
Description copied from interface: DockableProperty
Stores the contents of this DockableProperty in a stream. The successor (if there is one) must not be saved.

Parameters:
out - the stream to write in
Throws:
IOException - if anything unexpected happens

store

public void store(XElement element)
Description copied from interface: DockableProperty
Stores the contents of this property as xml element.

Parameters:
element - the element into which to write, the attributes of this element should not be changed

load

public void load(DataInputStream in)
          throws IOException
Description copied from interface: DockableProperty
Reads the contents of this DockableProperty from a stream. The property can assume that a property with the same type has written into the stream.

Parameters:
in - the stream to read
Throws:
IOException - if anything unexpected happens

load

public void load(XElement element)
Description copied from interface: DockableProperty
Reads the contents of this DockableProperty from an xml element.

Parameters:
element - the element that was written earlier by this property

getHeight

public int getHeight()
Gets the height of the dialog.

Returns:
the height
See Also:
setHeight(int)

setHeight

public void setHeight(int height)
Sets the height of the dialog.

Parameters:
height - the height

getWidth

public int getWidth()
Gets the width of the dialog.

Returns:
the width
See Also:
setWidth(int)

setWidth

public void setWidth(int width)
Sets the width of the dialog.

Parameters:
width - the new width

getX

public int getX()
Gets the x-coordinate of the dialog.

Returns:
the x-coordinate
See Also:
setX(int)

setX

public void setX(int x)
Sets the location of the left size of the dialog.

Parameters:
x - the x-coordinate

getY

public int getY()
Gets the y-coordinate of the dialog

Returns:
the y-coordinate
See Also:
setY(int)

setY

public void setY(int y)
Sets the location of the top side of the dialog.

Parameters:
y - the y-coordinate

isFullscreen

public boolean isFullscreen()
Tells whether this location describes an element that is in fullscreen mode.

Returns:
the state

setFullscreen

public void setFullscreen(boolean fullscreen)
Sets the fullscreen mode

Parameters:
fullscreen - the new state

setPlaceholder

public void setPlaceholder(Path placeholder)
Sets the name of this location.

Parameters:
placeholder - the name, can be null

getPlaceholder

public Path getPlaceholder()
Gets the name of this location.

Returns:
the name, can be null

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractDockableProperty

equals

public boolean equals(Object obj)
Overrides:
equals in class AbstractDockableProperty