Class CMaximizedMode

All Implemented Interfaces:
CLocationMode, LocationMode, Mode<Location>, Iterable<CMaximizedModeArea>

public class CMaximizedMode extends MaximizedMode<CMaximizedModeArea> implements CLocationMode
Author:
Benjamin Sigg
  • Constructor Details

    • CMaximizedMode

      public CMaximizedMode(CControl control)
      Creates a new mode.
      Parameters:
      control - the control in whose realm this mode works.
  • Method Details

    • getCLocation

      public CLocation getCLocation(Dockable dockable)
      Description copied from interface: CLocationMode
      Gets the location of dockable which is in this mode.
      Specified by:
      getCLocation in interface CLocationMode
      Parameters:
      dockable - the element whose location is asked
      Returns:
      the location or null if it cannot be determined
    • getCLocation

      public CLocation getCLocation(Dockable dockable, Location location)
      Description copied from interface: CLocationMode
      Gets the location of dockable which might or might not be a child of this mode.
      Specified by:
      getCLocation in interface CLocationMode
      Parameters:
      dockable - the element
      location - the location dockable is supposed to be in if in this mode.
      Returns:
      the location or null if it cannot be determined
    • isBasicMode

      public boolean isBasicMode()
      Description copied from interface: CLocationMode
      Tells whether this mode is a basic mode or not. There are basic and advanced modes. A basic and an advanced mode may share the same representation (the same DockStations), but if in doubt the basic mode has more weight.
      Specified by:
      isBasicMode in interface CLocationMode
      Returns:
      true if this is a basic mode
    • respectWorkingAreas

      public boolean respectWorkingAreas(DockStation station)
      Description copied from interface: CLocationMode
      Tells whether Dockables which have this mode applied should respect the settings for CWorkingAreas.
      Specified by:
      respectWorkingAreas in interface CLocationMode
      Parameters:
      station - the station which is the parent of the Dockables
      Returns:
      true if the settings should be respected, false otherwise
    • createPerspective

      public LocationModePerspective createPerspective()
      Description copied from interface: CLocationMode
      Gets an object that represents this type of mode in a CPerspective.
      Specified by:
      createPerspective in interface CLocationMode
      Returns:
      the perspective version of this
    • getMaximizeArea

      public MaximizedModeArea getMaximizeArea(Dockable dockable, Location history)
      Description copied from class: MaximizedMode
      Gets the area to which dockable should be maximized. This can be MaximizedMode.getMaximizeArea(Dockable), or some other station.
      Overrides:
      getMaximizeArea in class MaximizedMode<CMaximizedModeArea>
      Parameters:
      dockable - the element that is maximized
      history - the history of the last place where dockable was maximized, might be null
      Returns:
      the preferred area to maximize dockable