Class FolderURIPropCnr

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, ISelectorExpression, Cloneable
Direct Known Subclasses:
FolderPropCnr

public class FolderURIPropCnr extends PropCnr implements ISelectorExpression
A PropCnr that can is a "directory" and can contain FileURIPropCnr's.
Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • FolderURIPropCnr

      public FolderURIPropCnr()
      Creates a FilePropCnr for the designer with the specified name with a null value.
    • FolderURIPropCnr

      public FolderURIPropCnr(Atom propertyAtom, URI uri)
      Creates a FilePropCnr for the designer with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
      uri - the file URI.
  • Method Details

    • getURI

      public URI getURI()
      Gets the folder name URI for this property.
    • clone

      Clone must be overridden.
      Overrides:
      clone in class PropCnr
      Throws:
      CloneNotSupportedException - If a subclass doesn't allow cloning, e.g. the client properties.
    • isPropFolder

      public boolean isPropFolder()
      Checks if this is a Folder property container. It is overridden by FolderPropCnr.
      Specified by:
      isPropFolder in interface IGProp<GProp<?>[]>
      Overrides:
      isPropFolder in class GProp<GProp<?>[]>
      Returns:
      true for FolderURIPropCnr, false otherwise.
    • isPropFile

      public boolean isPropFile()
      Checks if this is a File property container. It is overridden by FilePropCnr.
      Specified by:
      isPropFile in interface IGProp<GProp<?>[]>
      Overrides:
      isPropFile in class GProp<GProp<?>[]>
      Returns:
      true for FileURIPropCnr, false otherwise.
    • getSettings

      public FolderSettingsProp getSettings()
      Gets the settings container for the folder.
      Returns:
      null for none, otherwise the settings instance.
    • getDescription

      public String getDescription()
      Gets the description of this folder.
      Returns:
      The defined description, or null for none.
    • isSelected

      public boolean isSelected(EnvProps envProps)
      Called to resolve the SelectorExpression by custom Java code. This method first checks with it's settings if it is not selected. If so, false is returned. Otherwise this folders parent's isSelected() method is called and that return code is passed as return code, if the parent implements ISelectorExpression. If not, true is returned.
      Specified by:
      isSelected in interface ISelectorExpression
      Parameters:
      envProps - The Client Environment properties.
      Returns:
      true if the Selector is selected to be used, false otherwise.
    • hasSelector

      public boolean hasSelector()
      Checks if a selector is present for the folder.
    • getThemesMask

      public GThemes getThemesMask(GThemes initialMask)
      Gets the Panels Themes mask when this folder is in the Panel folder.

      This method checks the parent tree for the intersecting mask (the most narrow mask).

      Parameters:
      initialMask - The initial mask from a child property, null for none.
      Returns:
      The mask, or null for none (or not in a Panel folder).
    • equalsTree

      protected final Object equalsTree(PropCnr pc2, int how)
      Checks for equality in the whole container structure.

      NOTE: This method should not be overridden except in extreme situations, e.g. for MememtoPropCnr.

      Overrides:
      equalsTree in class PropCnr
      Parameters:
      pc2 - The property value to compare with.
      how - Flags EQC_* values for equal checking.
      Returns:
      Both atom and value are equal on all levels.
    • equalsTree

      protected Object equalsTree(PropCnr pc2, Class<? extends IGProp<?>> arrayItemClass, int how)
      Checks for equality in the whole container structure.

      NOTE: This method should not be overridden except in extreme situations, e.g. for MememtoPropCnr.

      Overrides:
      equalsTree in class PropCnr
      Parameters:
      pc2 - The property value to compare with.
      how - Flags EQC_* values for equal checking.
      Returns:
      Both atom and value are equal on all levels.
    • hashCode

      public int hashCode()
      Returns the hash code of this object.
      Overrides:
      hashCode in class Object
      Returns:
      This object's hash code.
    • paramString

      protected String paramString(boolean includeFullProperties)
      Returns the parameter string representing the state of this event. This string is useful for debugging. Subclasses adds extra information to the string by preceding it with a comma followed by the extra information.
      Overrides:
      paramString in class GProp<GProp<?>[]>
      Parameters:
      includeFullProperties - Flag to include full properties or not.
      Returns:
      the parameter string of this event.