Class SimpleNodeWrapper

    • Field Detail

      • defaultIcon

        protected static final java.util.List<java.lang.String> defaultIcon
      • icons

        protected java.util.List<java.lang.String> icons
      • returnIcons

        protected java.util.List<java.lang.String> returnIcons
      • text

        protected java.lang.String text
      • object

        protected java.lang.Object object
      • clipboardValue

        protected java.lang.String clipboardValue
      • showIcons

        protected boolean showIcons
      • contextArgument

        protected java.lang.Object contextArgument
      • amount

        protected int amount
    • Constructor Detail

      • SimpleNodeWrapper

        public SimpleNodeWrapper​(java.lang.Object obj,
                                 java.lang.String text,
                                 java.lang.String icon)
        Parameters:
        obj -
        text -
        icon - may be null
      • SimpleNodeWrapper

        public SimpleNodeWrapper​(java.lang.Object obj,
                                 java.lang.String text,
                                 java.util.Collection<java.lang.String> icons)
        Parameters:
        obj -
        text -
        icons - may be null
      • SimpleNodeWrapper

        public SimpleNodeWrapper​(java.lang.Object obj,
                                 java.lang.String text,
                                 java.lang.String icon,
                                 java.lang.String clipboardValue)
        Creates new SimpleNodeWrapper.
        Parameters:
        obj -
        text -
        icon - may be null
        clipboardValue -
      • SimpleNodeWrapper

        public SimpleNodeWrapper​(java.lang.Object obj,
                                 java.lang.String text,
                                 java.util.Collection<java.lang.String> icons,
                                 java.lang.String clipboardValue)
        Creates new SimpleNodeWrapper. If icon == null, a default icon is displayed. If clipboardValue == null, the text is returned as clipboard value.
        Parameters:
        obj -
        text -
        icons - may be null meaning no icons
        clipboardValue - may be null
      • SimpleNodeWrapper

        public SimpleNodeWrapper​(java.lang.Object obj,
                                 java.util.Collection<java.lang.String> icons)
        Creates a new SimpleNodeWrapper object.
      • SimpleNodeWrapper

        public SimpleNodeWrapper​(java.lang.Object obj,
                                 java.lang.String icon)
        Creates a new SimpleNodeWrapper object.
    • Method Detail

      • isShowingIcons

        public boolean isShowingIcons()
        DOCUMENT-ME
      • setShowIcons

        public void setShowIcons​(boolean b)
        DOCUMENT-ME
      • getIconNames

        public java.util.List<java.lang.String> getIconNames()
        Description copied from interface: CellObject
        Returns a list of String objects that denote the file name (without the extension) of the icons to be displayed by the tree cell renderer. A return value of null is valid to indicate that no icons shall be displayed.
        Specified by:
        getIconNames in interface CellObject
        Returns:
        list of icon names or null if no icons shall be displayed.
        See Also:
        CellObject.getIconNames()
      • setAmount

        public void setAmount​(int i)
        Parameters:
        i -
      • getAmount

        public int getAmount()
        DOCUMENT-ME
      • toString

        public java.lang.String toString()
        DOCUMENT-ME
        Specified by:
        toString in interface CellObject
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representation of this CellObject
      • getObject

        public java.lang.Object getObject()
        DOCUMENT-ME
      • createSimpleDrawPolicy

        protected NodeWrapperDrawPolicy createSimpleDrawPolicy​(java.util.Properties settings,
                                                               java.lang.String prefix)
      • getArgument

        public java.lang.Object getArgument()
        Description copied from interface: Changeable
        The game object for which this Changeable is responsible.
        Specified by:
        getArgument in interface Changeable
        Returns:
        the game object for which this Changeable is responsible.
        See Also:
        Changeable.getArgument()
      • setContextFactory

        public void setContextFactory​(ContextFactory contextFactory)
        Sets the context factory for this node.
        See Also:
        Changeable
      • setArgument

        public void setArgument​(java.lang.Object argument)
        Sets the argument for the ContextFactory.
        See Also:
        Changeable
      • init

        public NodeWrapperDrawPolicy init​(java.util.Properties settings,
                                          NodeWrapperDrawPolicy adapter)
        DOCUMENT-ME
        Specified by:
        init in interface CellObject
        Returns:
        A preferences adapter factory. If adapter!=null it should be returned. If this object has no changeable preferences, null should be returned.
      • init

        public NodeWrapperDrawPolicy init​(java.util.Properties settings,
                                          java.lang.String prefix,
                                          NodeWrapperDrawPolicy adapter)
        DOCUMENT-ME
        Specified by:
        init in interface CellObject
        prefix - Prefix for properties keys
        adapter - The cell object should be appended to this adapter. If this is null a new adapter should be returned.
        Returns:
        A preferences adapter factory. If adapter!=null it should be returned. If this object has no changeable preferences, null should be returned.