org.eml.MMAX2.annotation.scheme
Class MMAX2Attribute

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.eml.MMAX2.annotation.scheme.MMAX2Attribute
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.DocumentListener, AttributeAPI

public class MMAX2Attribute
extends javax.swing.JPanel
implements java.awt.event.ActionListener, javax.swing.event.DocumentListener, AttributeAPI

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 boolean isBranching
           
 java.lang.String oldValue
           
 boolean readOnly
           
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.eml.MMAX2.api.AttributeAPI
FREETEXT, MARKABLE_POINTER, MARKABLE_SET, NOMINAL_BUTTON, NOMINAL_LIST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MMAX2Attribute(java.lang.String id, java.lang.String attributeName, int _type, org.w3c.dom.NodeList allChildren, MMAX2AnnotationScheme currentScheme, int width, java.lang.String tiptext, java.lang.String hintText, int _lineWidth, java.awt.Color _color, int _lineStyle, int _maxSize, java.lang.String _targetDomain, java.lang.String _add_instruction, java.lang.String _remove_instruction, java.lang.String _adopt_instruction, java.lang.String _merge_instruction, java.lang.String _point_to_markable_instruction, java.lang.String _remove_pointer_to_markable_instruction, float fontSize, boolean _dashed, java.lang.String _toShowInFlag)
          Creates new SchemeLevel.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent p1)
          This handler is called upon the selection of a button or a box menu item on this Attribute.
 void addDependsOn(MMAX2Attribute attrib)
           
 void changedUpdate(javax.swing.event.DocumentEvent p1)
           
 java.lang.String decodeAttributeType()
           
 boolean dependsOn(MMAX2Attribute superiorAttribute)
           
 void destroy()
           
 java.lang.String getAddToMarkablesetInstruction()
           
 java.lang.String getAdoptIntoMarkablesetInstruction()
           
 java.lang.String getAttributeNameToShowInMarkablePointerFlag()
           
 java.lang.String getDefaultValue()
          This method returns the (lower cased) default value for this attribute
 MMAX2Attribute[] getDirectlyDependentAttributes()
           
 java.lang.String getDisplayAttributeName()
           
 java.lang.String getID()
           
 boolean getIsBranching()
           
 boolean getIsDashed()
           
 boolean getIsFrozen()
           
 boolean getIsReadOnly()
           
 java.awt.Color getLineColor()
           
 int getLineStyle()
           
 int getLineWidth()
           
 java.lang.String getLowerCasedAttributeName()
           
 MarkableRelation getMarkableRelation()
          (API) Returns the MarkableRelation object that this MMAX2Attribute is associated with.
 int getMaxSize()
           
 java.lang.String getMergeIntoMarkablesetInstruction()
           
 MMAX2Attribute[] getNextAttributes(boolean toDefault)
          This method returns an array of the MMAX2Attributes that *the current value* of this points to as 'next', or empty Array.
 java.util.ArrayList getOrderedValues()
           
 java.lang.String getPointToMarkableInstruction()
           
 java.lang.String getRemoveFromMarkablesetInstruction()
           
 java.lang.String getRemovePointerToMarkableInstruction()
           
 int getSelectedIndex()
           
 java.lang.String getSelectedValue()
           
 int getType()
           
 boolean inDomain(java.lang.String domain)
           
 void insertUpdate(javax.swing.event.DocumentEvent p1)
           
 boolean isDefined(java.lang.String value)
           
 boolean isIndependent()
           
 void removeUpdate(javax.swing.event.DocumentEvent p1)
           
 void setEnabled(boolean status)
           
 void setIsFrozen(boolean status, java.lang.String illegalValue)
           
 void setMarkableRelation(MarkableRelation mrelation)
           
 void setSelectedIndex(int num)
           
 boolean setSelectedValue(java.lang.String desiredValue, boolean ignore)
          This method tries to select the JRadioButton associated with the value desiredValue.
 void toDefault()
          This method resets this Schemelevel to default
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isBranching

public boolean isBranching

readOnly

public boolean readOnly

oldValue

public java.lang.String oldValue
Constructor Detail

MMAX2Attribute

public MMAX2Attribute(java.lang.String id,
                      java.lang.String attributeName,
                      int _type,
                      org.w3c.dom.NodeList allChildren,
                      MMAX2AnnotationScheme currentScheme,
                      int width,
                      java.lang.String tiptext,
                      java.lang.String hintText,
                      int _lineWidth,
                      java.awt.Color _color,
                      int _lineStyle,
                      int _maxSize,
                      java.lang.String _targetDomain,
                      java.lang.String _add_instruction,
                      java.lang.String _remove_instruction,
                      java.lang.String _adopt_instruction,
                      java.lang.String _merge_instruction,
                      java.lang.String _point_to_markable_instruction,
                      java.lang.String _remove_pointer_to_markable_instruction,
                      float fontSize,
                      boolean _dashed,
                      java.lang.String _toShowInFlag)
Creates new SchemeLevel. attributeName is in the original spelling (upper/lower case) as supplied in the annotation scheme.

Method Detail

getDisplayAttributeName

public final java.lang.String getDisplayAttributeName()

getOrderedValues

public final java.util.ArrayList getOrderedValues()

getDirectlyDependentAttributes

public final MMAX2Attribute[] getDirectlyDependentAttributes()

getAttributeNameToShowInMarkablePointerFlag

public final java.lang.String getAttributeNameToShowInMarkablePointerFlag()

destroy

public final void destroy()

inDomain

public final boolean inDomain(java.lang.String domain)

getAddToMarkablesetInstruction

public final java.lang.String getAddToMarkablesetInstruction()

getRemoveFromMarkablesetInstruction

public final java.lang.String getRemoveFromMarkablesetInstruction()

getAdoptIntoMarkablesetInstruction

public final java.lang.String getAdoptIntoMarkablesetInstruction()

getMergeIntoMarkablesetInstruction

public final java.lang.String getMergeIntoMarkablesetInstruction()

getPointToMarkableInstruction

public final java.lang.String getPointToMarkableInstruction()

getRemovePointerToMarkableInstruction

public final java.lang.String getRemovePointerToMarkableInstruction()

setMarkableRelation

public final void setMarkableRelation(MarkableRelation mrelation)

getMarkableRelation

public final MarkableRelation getMarkableRelation()
Description copied from interface: AttributeAPI
(API) Returns the MarkableRelation object that this MMAX2Attribute is associated with.

Specified by:
getMarkableRelation in interface AttributeAPI
Returns:
The MarkableRelation object that this MMAX2Attribute is associated with, or null if none.

getDefaultValue

public java.lang.String getDefaultValue()
This method returns the (lower cased) default value for this attribute


getIsDashed

public final boolean getIsDashed()

getLineWidth

public final int getLineWidth()

getLineColor

public final java.awt.Color getLineColor()

getLineStyle

public final int getLineStyle()

getMaxSize

public final int getMaxSize()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent p1)
This handler is called upon the selection of a button or a box menu item on this Attribute.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

getNextAttributes

public MMAX2Attribute[] getNextAttributes(boolean toDefault)
This method returns an array of the MMAX2Attributes that *the current value* of this points to as 'next', or empty Array.


getSelectedIndex

public int getSelectedIndex()

getSelectedValue

public java.lang.String getSelectedValue()

setSelectedValue

public boolean setSelectedValue(java.lang.String desiredValue,
                                boolean ignore)
This method tries to select the JRadioButton associated with the value desiredValue. For attributes of type freetext or id, it sets the value to desiredValue. It returns true if the value was found, false otherwise. For attributes of type id and freetext, result is always true, because no constraints can exist for these attributes. FIXME If desiredValue is a null String, index 0 is set.


addDependsOn

public final void addDependsOn(MMAX2Attribute attrib)

isIndependent

public final boolean isIndependent()

dependsOn

public final boolean dependsOn(MMAX2Attribute superiorAttribute)

setSelectedIndex

public void setSelectedIndex(int num)

setEnabled

public void setEnabled(boolean status)
Overrides:
setEnabled in class javax.swing.JComponent

toDefault

public void toDefault()
This method resets this Schemelevel to default


removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent p1)
Specified by:
removeUpdate in interface javax.swing.event.DocumentListener

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent p1)
Specified by:
changedUpdate in interface javax.swing.event.DocumentListener

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent p1)
Specified by:
insertUpdate in interface javax.swing.event.DocumentListener

getType

public int getType()

decodeAttributeType

public final java.lang.String decodeAttributeType()

isDefined

public boolean isDefined(java.lang.String value)

getLowerCasedAttributeName

public final java.lang.String getLowerCasedAttributeName()

getID

public final java.lang.String getID()

getIsBranching

public final boolean getIsBranching()

getIsFrozen

public final boolean getIsFrozen()

getIsReadOnly

public final boolean getIsReadOnly()

setIsFrozen

public void setIsFrozen(boolean status,
                        java.lang.String illegalValue)