Class CommonDockStationLayout

java.lang.Object
bibliothek.gui.dock.common.intern.station.CommonDockStationLayout

public class CommonDockStationLayout extends Object
Information about the layout of a CommonDockStation, used by the CommonDockStationFactory to store and load the layout.
Author:
Benjamin Sigg
  • Constructor Details

    • CommonDockStationLayout

      public CommonDockStationLayout(String id, boolean root, String factoryId, DockLayout<?> layout)
      Creates a new layout.
      Parameters:
      id - the unique identifier of the described CommonDockStation, might be null
      root - whether the CStation is a root station
      factoryId - the unique identifier of the DockFactory that is used to read or write the actual layout
      layout - the layout that was loaded by the factory factoryId
    • CommonDockStationLayout

      public CommonDockStationLayout(String id, boolean root, String factoryId, byte[] layout)
      Creates a new layout.
      Parameters:
      id - the unique identifier of the described CommonDockStation, might be null
      root - whether the CStation is a root station
      factoryId - the unique identifier of the DockFactory that is used to read or write the actual layout
      layout - the layout that might be loaded by the factory factoryId
    • CommonDockStationLayout

      public CommonDockStationLayout(String id, boolean root, String factoryId, XElement layout)
      Creates a new layout.
      Parameters:
      id - the unique identifier of the described CommonDockStation, might be null
      root - whether the CStation is a root station
      factoryId - the unique identifier of the DockFactory that is used to read or write the actual layout
      layout - the layout that might be loaded by the factory factoryId
  • Method Details

    • updateLayout

      public void updateLayout(DockFactory<?,?,Object> factory, PlaceholderStrategy placeholders)
      Updates the contents of the internal DockLayoutInfo using factory to read a byte array or an XElement.
      Parameters:
      factory - the factory used to read the layout
      placeholders - the placeholders that may be used
    • getId

      public String getId()
      Gets the unique id of the CommonDockStation which is described by this layout.
      Returns:
      the unique id, might be null
    • isRoot

      public boolean isRoot()
      Tells whether the CStation was added to the CControl with the root flag set to true.
      Returns:
      the root flag
    • getFactoryId

      public String getFactoryId()
      Gets the unique id of the DockFactory that is used to read and store the actual layout.
      Returns:
      the factory to be used, not null
    • getLayoutBytes

      public byte[] getLayoutBytes()
      Gets the layout information as byte array, assuming that the layout information is stored as byte array.
      Returns:
      the layout information or null if not stored in byte array format
    • getLayoutXML

      public XElement getLayoutXML()
      Gets the layout information as xml element, assuming that the layout information is stored in xml.
      Returns:
      the layout information or null if not stored in xml format
    • getLayout

      public DockLayout<?> getLayout()
      Gets the layout information that was produced the DockFactory with id getFactoryId().
      Returns:
      the layout information or null if not present in object format