Class AbstractPart

    • Field Detail

      • vertical

        protected boolean vertical
      • labelFlushed

        protected boolean labelFlushed
      • withLabel

        protected boolean withLabel
      • labelNextToInput

        protected boolean labelNextToInput
      • enabledOnSelection

        protected boolean enabledOnSelection
    • Constructor Detail

      • AbstractPart

        public AbstractPart​(ParameterDescriptor paramDescriptor)
        Creates a new BasePart object with a given parameter description.
        Parameters:
        paramDescriptor - the parameter description for this UI part.
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: IParameterDescriptor
        Gets the programming name of this parameter. the name must follow the JavaBean naming conventions. For example, a parameter accessible by getMyText and setMyText must be named myText
        Specified by:
        getName in interface IParameterDescriptor
        Returns:
        the programming name of this parameter.
      • getReadMethod

        public Method getReadMethod()
        Description copied from interface: IParameterDescriptor
        Gets the method to obtain the current value of this parameter.
        Specified by:
        getReadMethod in interface IParameterDescriptor
        Returns:
        the method to get the current value of this parameter.
      • setDisplayName

        public void setDisplayName​(String displayName)
        Description copied from interface: IParameterDescriptor
        Sets the localizable name of this parameter.
        Specified by:
        setDisplayName in interface IParameterDescriptor
        Parameters:
        displayName - the new localizable name of this parameter.
      • setShortDescription

        public void setShortDescription​(String shortDescription)
        Description copied from interface: IParameterDescriptor
        Gets the short localizable description of this parameter.
        Specified by:
        setShortDescription in interface IParameterDescriptor
        Parameters:
        shortDescription - the new short localizable description of this parameter.
      • isWithLabel

        public boolean isWithLabel()
        Indicates if this UI part should be displayed with a label. When this option is not set: no label is displayed and the entry field takes the space where the label would be.
        Returns:
        true if this UI part should be displayed with a label.
      • setWithLabel

        public void setWithLabel​(boolean withLabel)
        Sets the flag indicating if this UI part should be displayed with a label.
        Parameters:
        withLabel - true if this UI part should be displayed with a label.
      • isVertical

        public boolean isVertical()
        Indicates if this UI part should be arranged vertically. By default it is not.
        Returns:
        true if this UI part should be arranged vertically.
      • setVertical

        public void setVertical​(boolean vertical)
        Sets the flag indicating if this UI part should be arranged vertically.
        Parameters:
        vertical - the new flag indicating if this UI part should be arranged vertically.
      • isLabelFlushed

        public boolean isLabelFlushed()
        Indicates if the label of this UI part should be flushed next to the part.
        Returns:
        true if the label of this UI part should be flushed next to the part.
      • setLabelFlushed

        public void setLabelFlushed​(boolean labelFlushed)
        Sets the flag indicating if the label of this UI part should be flushed next to the part.
        Parameters:
        labelFlushed - the new flag indicating if the label of this UI part should be flushed next to the part.
      • getContainer

        public IContainerPart getContainer()
        Gets the container part of this part.
        Returns:
        the container part of this part or null.
      • setContainer

        public void setContainer​(IContainerPart container)
        Sets the container part for this part.
        Parameters:
        container - the new container part for this part.
      • setMasterPart

        public void setMasterPart​(AbstractPart masterPart,
                                  boolean enabledOnSelection)
        Binds this part to a master part. Use this to make this part be enabled or disabled depending on the specified master part.
        Parameters:
        masterPart - the UI part that enables or disables this part.
        enabledOnSelection - true if this part is enabled only when the master part is selected, false to enable this part when the master part is not selected.
      • getMasterPart

        public AbstractPart getMasterPart()
        Gets the master part associated with this UI part.
        Returns:
        the master part associated with this UI part, or null if there is none.
      • isEnabledOnSelection

        public boolean isEnabledOnSelection()
        Indicates how this part is enabled in relation to its master part.
        Returns:
        true if this part is enabled only when the master part is selected, false to enable this part when the master part is not selected.
      • isLabelNextToInput

        public boolean isLabelNextToInput()
        Indicates that the label for this part is to be displayed next to the input field.
        Returns:
        true if the label for this part is to be displayed next to the input field.
      • setLabelNextToInput

        public void setLabelNextToInput​(boolean labelNextToInput)
        Sets the indicator that tells if the label for this part is to be displayed next to the input field.
        Parameters:
        labelNextToInput - true to set the indicator so the label for this part is to be displayed next to the input field.
      • checkType

        protected void checkType()
        Checks the types supported by this UI part.
        Throws:
        OkapiNotImplementedException - if this UI part does not support the type of the parameter description it is created with.