Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protege.widget
Class FormWidget

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      edu.stanford.smi.protege.widget.AbstractWidget
                          edu.stanford.smi.protege.widget.AbstractClsWidget
                              edu.stanford.smi.protege.widget.FormWidget

All Implemented Interfaces:
  Plugin, Disposable, Selectable, ClsWidget, Widget, ImageObserver, MenuContainer, Serializable, Accessible

    public class FormWidget

extends AbstractClsWidget

The default implementation of ClsWidget. Each slot is displayed in its own SlotWidget. The layout of slot widgets is delegated to the WidgetLayoutManager.

Author:
  Ray Fergerson
See Also:
  Serialized Form

Nested Class Summary

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

Nested classes/interfaces inherited from class javax.swing.JComponent
`JComponent.AccessibleJComponent`

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

Nested classes/interfaces inherited from class java.awt.Component
`Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy`

Field Summary
`static String` | `STRETCH_ALL`
`static String` | `STRETCH_NONE`

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, 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
`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`

Constructor Summary
`FormWidget()`

Method Summary
`void` | `clearSelection()`
`boolean` | `configure()`
`void` | `createDescriptorsAndWidgets(Collection slots)`
`WidgetDescriptor` | `createWidgetDescriptor(Slot slot)`
`protected void` | `createWidgets()`
`void` | `dispose()`
`protected Collection` | `getClsSlots()`
`protected Cls` | `getCustomizedParent(Cls cls)`
`String` | `getHorizontalStretcher()`
`String` | `getLabel()`
`Dimension` | `getPreferredSize()`
`Collection` | `getSelection()`
`SlotWidget` | `getSlotWidget(Slot slot)`
`String` | `getVerticalStretcher()`
`WidgetDescriptor` | `getWidgetDescriptor(Slot slot)`
`boolean` | `hasWidgetDescriptor(Slot slot)`
`boolean` | `hasWidgetDescriptors()`
`void` | `highlightSlot(Slot slot, Color color)` Put a border around the give slot with the give color.
`void` | `initialize()`
`protected boolean` | `isSuitable(WidgetDescriptor d, Cls cls, Slot slot)`
`void` | `layoutLikeCls(Cls prototype)`
`void` | `layoutLikeParent()`
`void` | `mouseDraggedOnWidget(Component c, Point p)`
`void` | `mouseMovedOnWidget(Component c, Point p)`
`protected void` | `onTemplateFacetValueChanged(Cls cls, Slot slot, Facet facet)`
`protected void` | `onTemplateSlotAdded(Cls cls, Slot slot)`
`protected void` | `onTemplateSlotRemoved(Cls cls, Slot slot)`
`void` | `relayout()`
`void` | `reload()`
`void` | `removeCustomizations()`
`void` | `removeWidgetDescriptor(String slotName)`
`void` | `replaceSelectedWidget(String newWidgetClassName)`
`void` | `replaceWidget(Slot slot, String newWidgetClassName)`
`void` | `setAssociatedCls(Cls associatedCls)`
`void` | `setEditable(boolean b)`
`void` | `setHorizontalStretcher(String hs)`
`void` | `setInstance(Instance instance)`
`void` | `setModified(boolean b)`
`void` | `setResizeVertically(boolean b)`
`void` | `setSelection(Object o)`
`void` | `setVerticalStretcher(String vs)`
`void` | `setWidgetValues()`

Methods inherited from class edu.stanford.smi.protege.widget.AbstractClsWidget
`addWidgetListener, getAssociatedCls, getCls, getInstance, handleBrowserTextChanged, handleFrameNameChanged, handleOwnSlotValueChanged, postWidgetEvent, removeWidgetListener, setup`

Methods inherited from class edu.stanford.smi.protege.widget.AbstractWidget
`addSelectionListener, beginTransaction, beginTransaction, commitTransaction, endTransaction, equals, getDescriptor, getKnowledgeBase, getProject, getPropertyList, getStringProperty, isDesignTime, isRuntime, notifySelectionListeners, paint, removeSelectionListener, rollbackTransaction, setLabel, setPropertyList, setup, show, showInstance`

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, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, setEnabled, 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, transferFocusBackward, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface edu.stanford.smi.protege.widget.Widget
`getDescriptor, getKnowledgeBase, getProject, setLabel`

Methods inherited from interface edu.stanford.smi.protege.util.Selectable
`addSelectionListener, notifySelectionListeners, removeSelectionListener`

Methods inherited from interface edu.stanford.smi.protege.plugin.Plugin
`getName`

Field Detail

### STRETCH_ALL

    public static final String STRETCH_ALL

See Also:
  Constant Field Values

### STRETCH_NONE

    public static final String STRETCH_NONE

See Also:
  Constant Field Values

Constructor Detail

### FormWidget

    public FormWidget()

Method Detail

### onTemplateSlotAdded

    protected void onTemplateSlotAdded(Cls cls,
                                       Slot slot)

### onTemplateSlotRemoved

    protected void onTemplateSlotRemoved(Cls cls,
                                         Slot slot)

### onTemplateFacetValueChanged

    protected void onTemplateFacetValueChanged(Cls cls,
                                               Slot slot,
                                               Facet facet)

### clearSelection

    public void clearSelection()

  Specified by:
    `clearSelection` in interface `Selectable`
  Overrides:
    `clearSelection` in class `AbstractWidget`

### configure

    public boolean configure()

### createDescriptorsAndWidgets

    public void createDescriptorsAndWidgets(Collection slots)

### createWidgetDescriptor

    public WidgetDescriptor createWidgetDescriptor(Slot slot)

### getClsSlots

    protected Collection getClsSlots()

### createWidgets

    protected void createWidgets()

### dispose

    public void dispose()

  Specified by:
    `dispose` in interface `Disposable`
  Overrides:
    `dispose` in class `AbstractClsWidget`

### getCustomizedParent

    protected Cls getCustomizedParent(Cls cls)

### getHorizontalStretcher

    public String getHorizontalStretcher()

### getLabel

    public String getLabel()

  Specified by:
    `getLabel` in interface `Widget`
  Overrides:
    `getLabel` in class `AbstractWidget`

### getPreferredSize

    public Dimension getPreferredSize()

  Overrides:
    `getPreferredSize` in class `JComponent`

### getSelection

    public Collection getSelection()

  Specified by:
    `getSelection` in interface `Selectable`
  Overrides:
    `getSelection` in class `AbstractWidget`

### getVerticalStretcher

    public String getVerticalStretcher()

### getSlotWidget

    public SlotWidget getSlotWidget(Slot slot)

### highlightSlot

    public void highlightSlot(Slot slot,
                              Color color)

  Put a border around the give slot with the give color. If the color passed in is null then any colored border is removed.

### getWidgetDescriptor

    public WidgetDescriptor getWidgetDescriptor(Slot slot)

### hasWidgetDescriptor

    public boolean hasWidgetDescriptor(Slot slot)

### hasWidgetDescriptors

    public boolean hasWidgetDescriptors()

### setResizeVertically

    public void setResizeVertically(boolean b)

### initialize

    public void initialize()

### reload

    public void reload()

### isSuitable

    protected boolean isSuitable(WidgetDescriptor d,
                                 Cls cls,
                                 Slot slot)

### layoutLikeCls

    public void layoutLikeCls(Cls prototype)

### layoutLikeParent

    public void layoutLikeParent()

### mouseDraggedOnWidget

    public void mouseDraggedOnWidget(Component c,
                                     Point p)

### mouseMovedOnWidget

    public void mouseMovedOnWidget(Component c,
                                   Point p)

### relayout

    public void relayout()

### removeCustomizations

    public void removeCustomizations()

### removeWidgetDescriptor

    public void removeWidgetDescriptor(String slotName)

### replaceSelectedWidget

    public void replaceSelectedWidget(String newWidgetClassName)

### replaceWidget

    public void replaceWidget(Slot slot,
                              String newWidgetClassName)

### setAssociatedCls

    public void setAssociatedCls(Cls associatedCls)

  Specified by:
    `setAssociatedCls` in interface `ClsWidget`
  Overrides:
    `setAssociatedCls` in class `AbstractClsWidget`

### setEditable

    public void setEditable(boolean b)

### setHorizontalStretcher

    public void setHorizontalStretcher(String hs)

### setInstance

    public void setInstance(Instance instance)

  Specified by:
    `setInstance` in interface `ClsWidget`
  Overrides:
    `setInstance` in class `AbstractClsWidget`

### setModified

    public void setModified(boolean b)

### setSelection

    public void setSelection(Object o)

### setVerticalStretcher

    public void setVerticalStretcher(String vs)

### setWidgetValues

    public void setWidgetValues()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2009 Stanford University.