Class GoldenPanel

All Implemented Interfaces:
Serializable, Cloneable, Component, Scope, ComponentCtrl

public class GoldenPanel extends XulElement
A GoldenPanel component. Which is the only child type for GoldenLayout.
Since:
8.6.0
See Also:
  • Constructor Details

    • GoldenPanel

      public GoldenPanel()
    • GoldenPanel

      public GoldenPanel(String area)
  • Method Details

    • onInitMatrix

      public void onInitMatrix()
    • getArea

      public String getArea()
      Returns:
      the area of this GoldenPanel.
    • setArea

      public void setArea(String area)
      Sets the area of this GoldenPanel, use to represent the area of this panel on initial rendering. Note that the area is not changeable after specified. And it doesn't remain the same due to user's action.
      Parameters:
      area - of this GoldenPanel
    • setWidth

      public void setWidth(String width)
      Not supported, use hflex instead.
      Overrides:
      setWidth in class HtmlBasedComponent
      See Also:
    • setHeight

      public void setHeight(String height)
      Not supported, use vflex instead.
      Overrides:
      setHeight in class HtmlBasedComponent
    • setVflexDirectly

      protected void setVflexDirectly(String flex)
      Description copied from class: HtmlBasedComponent
      Sets the vflex directly without sending back the result (smart update) to the client
      Overrides:
      setVflexDirectly in class HtmlBasedComponent
    • setVflex

      public void setVflex(String flex)
      Description copied from class: HtmlBasedComponent
      Sets vertical flexibility hint of this component.

      Number flex indicates how this component's container distributes remaining empty space among its children vertically. Flexible component grow and shrink to fit their given space. Flexible components with larger flex values will be made larger than components with lower flex values, at the ratio determined by all flexible components. The actual flex value is not relevant unless there are other flexible components within the same container. Once the default sizes of components in a container are calculated, the remaining space in the container is divided among the flexible components, according to their flex ratios.

      Specify a flex value of negative value, 0, or "false" has the same effect as leaving the flex attribute out entirely. Specify a flex value of "true" has the same effect as a flex value of 1.

      Special flex hint, "min", indicates that the minimum space shall be given to this flexible component to enclose all of its children components. That is, the flexible component grow and shrink to fit its children components.

      Overrides:
      setVflex in class HtmlBasedComponent
      Parameters:
      flex - the vertical flex hint.
      See Also:
    • setHflexDirectly

      protected void setHflexDirectly(String flex)
      Description copied from class: HtmlBasedComponent
      Sets the hflex directly without sending back the result (smart update) to the client
      Overrides:
      setHflexDirectly in class HtmlBasedComponent
    • setHflex

      public void setHflex(String flex)
      Description copied from class: HtmlBasedComponent
      Sets horizontal flex hint of this component.

      Number flex indicates how this component's container distributes remaining empty space among its children horizontally. Flexible component grow and shrink to fit their given space. Flexible components with larger flex values will be made larger than components with lower flex values, at the ratio determined by all flexible components. The actual flex value is not relevant unless there are other flexible components within the same container. Once the default sizes of components in a container are calculated, the remaining space in the container is divided among the flexible components, according to their flex ratios.

      Specify a flex value of negative value, 0, or "false" has the same effect as leaving the flex attribute out entirely. Specify a flex value of "true" has the same effect as a flex value of 1.

      Special flex hint, "min", indicates that the minimum space shall be given to this flexible component to enclose all of its children components. That is, the flexible component grow and shrink to fit its children components.

      Overrides:
      setHflex in class HtmlBasedComponent
      Parameters:
      flex - horizontal flex hint of this component.
      See Also:
    • getTitle

      public String getTitle()
      Returns the title on the tab of the GoldenPanel.
      Returns:
      the title
    • setTitle

      public void setTitle(String title)
      Sets the title to the tab of the GoldenPanel.
      Parameters:
      title -
    • isDraggable

      public boolean isDraggable()
      Returns whether the GoldenPanel should be draggable.

      Note that this method overwrites the normal action of zk isDraggable. Draggable true doesn't performs the normal zk draggable action, but only the GoldenPanel tabs are draggable.

      Returns:
      draggable or not
    • setDraggable

      public void setDraggable(boolean draggable)
      Sets whether the GoldenPanel should be draggable or not.

      Note that this method overwrites the normal action of zk setDraggable. Setting true doesn't performs the normal zk draggable action, but only the GoldenPanel tabs are draggable.

      Parameters:
      draggable -
    • isDroppable

      public boolean isDroppable()
      Returns whether the stack of this GoldenPanel is droppable by other GoldenPanel.
      Returns:
      droppable or not
    • setDroppable

      public void setDroppable(boolean droppable)
      Sets whether the whole stack of this GoldenPanel is droppable by other GoldenPanel.
      Parameters:
      droppable -
    • isClosable

      public boolean isClosable()
      Returns whether this panel is closable.
      Returns:
      closable or not
    • setClosable

      public void setClosable(boolean closable)
      Sets whether this panel is closable.
      Parameters:
      closable -
    • onClose

      public void onClose()
    • beforeParentChanged

      public void beforeParentChanged(Component parent)
      Description copied from class: AbstractComponent
      Default: If parent is null, execute the @Destroy method if any.
      Specified by:
      beforeParentChanged in interface ComponentCtrl
      Overrides:
      beforeParentChanged in class AbstractComponent
      Parameters:
      parent - the new parent. If null, it means detachment.
      See Also:
    • droppedToRoot

      protected void droppedToRoot(String region)
    • droppedTo

      protected void droppedTo(GoldenPanel dropTarget, String region)
    • getLocation

      public Map<String,Integer> getLocation()
      Returns the location x0, x1, y0, y1 in the GoldenLayout areas layout matrix of this GoldenPanel.
      Returns:
      the location x0, x1, y0, y1
    • renderProperties

      protected void renderProperties(ContentRenderer renderer) throws IOException
      Description copied from class: HtmlBasedComponent
      Renders the content of this component, excluding the enclosing tags and children.

      See also ZK Client-side Reference: Property Rendering

      Overrides:
      renderProperties in class XulElement
      Throws:
      IOException
    • service

      public void service(AuRequest request, boolean everError)
      Description copied from class: HtmlBasedComponent
      Processes an AU request.

      Default: it handles onClick, onDoubleClick, onRightClick onMove, onSize, onZIndex.

      Specified by:
      service in interface ComponentCtrl
      Overrides:
      service in class HtmlBasedComponent
      everError - whether any error ever occurred before processing this request.
      See Also:
    • getPropertyAccess

      public PropertyAccess getPropertyAccess(String prop)
      Description copied from interface: ComponentCtrl
      Returns the corresponding property access object from the given property name, if any.
      Specified by:
      getPropertyAccess in interface ComponentCtrl
      Overrides:
      getPropertyAccess in class XulElement
      Parameters:
      prop - the name of the property
      Returns:
      null it means not to support for the property name.
    • evalCSSFlex

      public boolean evalCSSFlex()
      Description copied from class: HtmlBasedComponent
      Get whether css flex is enabled or not
      Overrides:
      evalCSSFlex in class HtmlBasedComponent
      Returns:
      css flex is enabled