Class AbstractTagPropEditor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  AbstractTagPropEditor.TagPropEditorExpandiblesHints  
      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.swing.JComponent[] accessoryComponents  
      protected javax.swing.event.ChangeEvent changeEvent  
      protected boolean disabled  
      protected javax.swing.JLabel errorIndicator  
      protected boolean fill  
      protected javax.swing.JLabel label  
      protected javax.swing.event.EventListenerList listenerList  
      protected javax.swing.JComponent mainComponent  
      protected javax.swing.JCheckBox multiBox  
      protected static javax.swing.JComponent[] NO_ACC_BTNS  
      protected OverrideControl overrideControl  
      protected boolean showError  
      protected TagEditController tag  
      • Fields inherited from class javax.swing.JComponent

        TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void addChangeListener​(javax.swing.event.ChangeListener l)  
      protected void checkCurrentEdit()  
      protected void clearError()  
      abstract void commit()
      Commits the current value, if any edits are outstanding.
      protected javax.swing.JLabel createLabel​(java.lang.String key)  
      void enableExpandables()
      Turns on expandible property support for this component.
      protected void fireStateChanged()
      Notifies all listeners that have registered interest for notification on this event type.
      protected javax.swing.text.JTextComponent getExpandablesTarget()
      Should be overridden by components that want to support expandables
      protected TagEditController getTagController()  
      boolean hasChanged()  
      void init​(TagEditController tag)  
      protected javax.swing.JComponent[] initButtons()
      Override to create accessory buttons
      protected void initComponents()  
      protected abstract javax.swing.JComponent initMainComponent()  
      boolean isEditValid()
      Checks to see if the current edit is valid or not.
      protected boolean isErrorShown()  
      boolean isFill()  
      boolean isModified()  
      abstract boolean isValueModified()  
      protected abstract boolean isValueOverridden()
      Should return whether the value of tag used by the component is currently overridden.
      protected void refreshVisualState()  
      void removeChangeListener​(javax.swing.event.ChangeListener l)  
      protected abstract void revertOverride()
      Called when the tag is not null and is inherited, when the user chooses to revert a property override.
      void setAccessoryItems​(javax.swing.JComponent[] items)  
      void setBorderText​(java.lang.String textKey)  
      void setDisabled​(boolean val)
      Sets whether this editor is currently disabled.
      void setEnabled​(boolean enabled)  
      void setFill​(boolean fill)  
      protected void showError​(java.lang.String error)  
      protected boolean supportsValueOverride()
      Controls whether this control supports the tag value override feature.
      protected void updateOverrideState()  
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • NO_ACC_BTNS

        protected static final javax.swing.JComponent[] NO_ACC_BTNS
      • multiBox

        protected javax.swing.JCheckBox multiBox
      • errorIndicator

        protected javax.swing.JLabel errorIndicator
      • label

        protected javax.swing.JLabel label
      • showError

        protected boolean showError
      • mainComponent

        protected javax.swing.JComponent mainComponent
      • accessoryComponents

        protected javax.swing.JComponent[] accessoryComponents
      • fill

        protected boolean fill
      • disabled

        protected boolean disabled
      • changeEvent

        protected transient javax.swing.event.ChangeEvent changeEvent
      • listenerList

        protected javax.swing.event.EventListenerList listenerList
    • Constructor Detail

      • AbstractTagPropEditor

        public AbstractTagPropEditor()
      • AbstractTagPropEditor

        public AbstractTagPropEditor​(java.lang.String labelKey)
    • Method Detail

      • setBorderText

        public void setBorderText​(java.lang.String textKey)
      • createLabel

        protected javax.swing.JLabel createLabel​(java.lang.String key)
      • initComponents

        protected void initComponents()
      • updateOverrideState

        protected void updateOverrideState()
      • setEnabled

        public void setEnabled​(boolean enabled)
        Overrides:
        setEnabled in class javax.swing.JComponent
      • setDisabled

        public void setDisabled​(boolean val)
        Sets whether this editor is currently disabled. This is the more "conceptual" counter part to enabled, which is best left as a purely mechanical function. In other words, this is the parameter that should be used when the current tag is not valid for the editor, or some other condition is not met. In will then be used to determine whether the component should be enabled or not, along with other conditions.

        Note that disabled editors don't show the override control.

      • setAccessoryItems

        public void setAccessoryItems​(javax.swing.JComponent[] items)
      • initMainComponent

        protected abstract javax.swing.JComponent initMainComponent()
      • initButtons

        protected javax.swing.JComponent[] initButtons()
        Override to create accessory buttons
      • refreshVisualState

        protected void refreshVisualState()
      • supportsValueOverride

        protected boolean supportsValueOverride()
        Controls whether this control supports the tag value override feature. If overridden to return false, the override toggle control will not be used.
        Returns:
        true unless overriden
      • isValueOverridden

        protected abstract boolean isValueOverridden()
        Should return whether the value of tag used by the component is currently overridden. Only called when the tag controller is not null and we know the tag is inherited.
      • revertOverride

        protected abstract void revertOverride()
        Called when the tag is not null and is inherited, when the user chooses to revert a property override.
      • commit

        public abstract void commit()
        Commits the current value, if any edits are outstanding.
      • isEditValid

        public final boolean isEditValid()
        Checks to see if the current edit is valid or not. Will show that the edit is invalid.
      • showError

        protected void showError​(java.lang.String error)
      • clearError

        protected void clearError()
      • isErrorShown

        protected boolean isErrorShown()
      • isModified

        public boolean isModified()
      • isValueModified

        public abstract boolean isValueModified()
      • hasChanged

        public boolean hasChanged()
      • addChangeListener

        public void addChangeListener​(javax.swing.event.ChangeListener l)
      • removeChangeListener

        public void removeChangeListener​(javax.swing.event.ChangeListener l)
      • fireStateChanged

        protected void fireStateChanged()
        Notifies all listeners that have registered interest for notification on this event type. The event instance is created lazily.
        See Also:
        EventListenerList
      • isFill

        public boolean isFill()
      • setFill

        public void setFill​(boolean fill)
      • enableExpandables

        public void enableExpandables()
        Turns on expandible property support for this component. The component must support expandibles (that is, have a text component, and override getExpandablesTarget())
      • getExpandablesTarget

        protected javax.swing.text.JTextComponent getExpandablesTarget()
        Should be overridden by components that want to support expandables