Class EGridLayout

All Implemented Interfaces:
ILinkCapable, IUIBuilderFromVSLinkEnabler, IClearComponentArea, IELayoutMgr<EGridData>, IELayoutMgrDND<EGridData>, IEUICompBase, IReplaceLayoutData, IScrollbarsValidation, IPropDesigner, ITransferContainerProps, EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable, IAdaptable

Grid layout.
Author:
Christopher Mindus
  • Constructor Details

    • EGridLayout

      public EGridLayout()
      Creates the property container without a name. The name must be set in all cases using the setPropertyAtom call.
    • EGridLayout

      public EGridLayout(Atom propertyAtom)
      Creates the property container with the specified name. All system-reserved names for components begins with "$".
      Parameters:
      propertyAtom - the name of the component, unique within it's parent.
  • Method Details

    • getLayoutDataClass

      public Class<EGridData> getLayoutDataClass()
      Gets the layout data class.
      Specified by:
      getLayoutDataClass in interface IELayoutMgr<EGridData>
    • isCNVisible

      public boolean isCNVisible()
      Checks if a property should be included in the view or if it's hidden or filtered out.
      Specified by:
      isCNVisible in interface IELayoutMgr<EGridData>
      Returns:
      Default is false, override to display in tree.
    • getDesigner

      public UILayoutDesignerProp getDesigner()
      Gets the Designer Extension for Properties.
      Specified by:
      getDesigner in interface IPropDesigner
      Returns:
      The instance of the Designer Extension.
    • getPropertyEditorLayoutDataSetup

      public Object[] getPropertyEditorLayoutDataSetup()
      Gets the layout data settings for a component.
      Specified by:
      getPropertyEditorLayoutDataSetup in interface IELayoutMgr<EGridData>
      Returns:
      The layout additional objects, or null for none.
    • getCNImage

      public Image getCNImage(boolean isMobile)
      Gets the image for the Common Navigator.
      Specified by:
      getCNImage in interface IEUICompBase
      Parameters:
      isMobile - The mobile theme flag.
      Returns:
      Image or null if there is no image.
    • getCNDescriptionType

      public String getCNDescriptionType()
      Provide a type description for the status bar view, if available.
      Specified by:
      getCNDescriptionType in interface IEUICompBase
      Specified by:
      getCNDescriptionType in interface ITransferContainerProps
      Returns:
      A type description for the status bar view, or null if not available.
    • clone

      public EGridLayout clone()
      Clone must be overridden.
      Overrides:
      clone in class GridLayout
    • isReplaceable

      public boolean isReplaceable()
      Checks if this layout manager is replaceable by another.
      Specified by:
      isReplaceable in interface IELayoutMgr<EGridData>
      Returns:
      By default, the layout managers are not replaceable, so this method must be overridden.
    • createDefaultLayoutProp

      public EGridData createDefaultLayoutProp(UIComp uiComp)
      Creates the default LayoutProp to use for a new component that is inserted directly into the UIComps container.
      Specified by:
      createDefaultLayoutProp in interface IELayoutMgr<EGridData>
      Overrides:
      createDefaultLayoutProp in class GridLayout
      Parameters:
      uiComp - The component requesting the default layout property.
      Returns:
      A new instance of the layout data of this layout manager.
    • setColumnCount

      public void setColumnCount(int count)
      Sets the column count without undo support.
    • getTransferProps

      public Object[] getTransferProps()
      Returns the list of properties that are transferable between layout managers.
      Specified by:
      getTransferProps in interface ITransferContainerProps
      Returns:
      The list of String's or Atom's that are transferable, null for none.
    • verify

      public boolean verify(PropVerification verification)
      Verifies this property container. The check performed is the extension of classes and that no circular reference is present.
      Specified by:
      verify in interface IGProp<GProp<?>[]>
      Overrides:
      verify in class PropCnr
      Parameters:
      verification - The property verification class.
      Returns:
      true if verification should proceed, false if disposed of and verification should not take place.
    • getGrid

      public EGridLayout.Grid getGrid()
      Gets a cached grid or builds it.
    • clearComponentArea

      public boolean clearComponentArea(ComplexOperation op, UIComp comp)
      Clears the area occupied by a component.
      Specified by:
      clearComponentArea in interface IClearComponentArea
      Parameters:
      op - Complex operation for undo/redo.
      comp - Component to delete.
      Returns:
      false for component not found, true for success.
    • checkReplaceLayoutData

      public void checkReplaceLayoutData(ComplexOperation op, UIComp comp)
      Perform check of the component layout data and replaces it if required.
      Specified by:
      checkReplaceLayoutData in interface IReplaceLayoutData
      Parameters:
      op - Complex operation for undo/redo, null when operation should be done directly on property.
      comp - Component to replace the layout data in.
    • onDrop

      public UIComp[] onDrop(DropInfo di)
      Performs a drop from JavaScript in this layout manager with the specified properties and the layout manager specific transaction data.
      Specified by:
      onDrop in interface IELayoutMgrDND<EGridData>
      Parameters:
      di - The drop information instance.
      Returns:
      The created components that will be selected, or null for aborted operation or failure.
    • convertLayout

      public void convertLayout(ComplexOperation op, UIContainer cnr, LayoutMgr<?> oldLayout)
      Called to convert one layout to another when the layout has been dropped into a container. The conversion must apply to all components in the container, e.g. that all components gets the GridData instead of AbsoluteData.
      Specified by:
      convertLayout in interface IELayoutMgrDND<EGridData>
      Parameters:
      op - The complex operation instance.
      cnr - The container.
      oldLayout - Old layout, already removed from the container and disposed of, null if none previously existed.