edu.stanford.smi.protege.widget
Class _AbstractWidget
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--edu.stanford.smi.protege.widget._AbstractWidget
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable
- Direct Known Subclasses:
- AbstractClsWidget, AbstractSlotWidget, AbstractTabWidget
- public abstract class _AbstractWidget
- extends JComponent
Description of the class
- Author:
- Ray Fergerson
- See Also:
- Serialized Form
Method Summary |
void |
addButtonConfiguration(Action action)
|
void |
addButtonConfiguration(Action action,
boolean defaultState)
|
JButton |
addMainWindowToolBarButton(Action action)
|
void |
addSelectionListener(SelectionListener listener)
|
void |
addWidgetListener(WidgetListener listener)
|
boolean |
allowsMultipleValues()
|
boolean |
canClose()
|
boolean |
canSave()
|
void |
clearSelection()
|
void |
close()
|
boolean |
configure()
|
protected JSplitPane |
createLeftRightSplitPane(String locationPropertyName,
int defaultLocation)
|
protected JSplitPane |
createTopBottomSplitPane(String locationPropertyName,
int defaultLocation)
|
WidgetConfigurationPanel |
createWidgetConfigurationPanel()
|
boolean |
displayButton(Action action)
|
protected boolean |
displayButton(String propertyName)
|
void |
dispose()
|
void |
finalize()
|
Cls |
getAssociatedCls()
|
String |
getButtonDescription(Action action)
|
Cls |
getCls()
|
WidgetDescriptor |
getDescriptor()
|
static Object |
getFirstItem(Collection c)
|
Icon |
getIcon()
|
Instance |
getInstance()
|
protected String |
getInvalidValueText(Collection values)
|
KnowledgeBase |
getKnowledgeBase()
|
String |
getLabel()
|
JMenuBar |
getMainWindowMenuBar()
|
protected int |
getMaximumCardinality()
|
protected int |
getMinimumCardinality()
|
Dimension |
getPreferredSize()
|
Project |
getProject()
|
PropertyList |
getPropertyList()
|
Collection |
getSelection()
|
String |
getShortDescription()
|
Slot |
getSlot()
|
String |
getStringProperty(String name,
String defaultString)
|
Collection |
getValues()
|
protected void |
handleBrowserTextChanged()
|
protected void |
handleFrameNameChanged()
|
protected void |
handleOwnSlotValueChanged(Slot slot)
|
boolean |
isDesignTime()
|
boolean |
isRuntime()
|
boolean |
isSlotAtCls()
|
static boolean |
isSuitable(Cls cls,
Slot slot,
Facet facet)
|
void |
loadValues()
|
void |
notifySelectionListeners()
|
void |
postWidgetEvent(int type)
|
void |
removeMainWindowToolBarButton(JButton button)
|
void |
removeSelectionListener(SelectionListener listener)
|
void |
removeWidgetListener(WidgetListener listener)
|
void |
reshape(int x,
int y,
int w,
int h)
|
void |
save()
|
protected static void |
setAllowed(AllowableAction action,
boolean state)
|
void |
setAssociatedCls(Cls cls)
|
void |
setCls(Cls cls)
|
void |
setEditable(boolean b)
|
void |
setIcon(Icon icon)
|
void |
setInstance(Instance newInstance)
|
void |
setInstance(Slot newSlotInstance,
Cls newAssociatedCls)
|
void |
setInstanceValues()
|
void |
setLabel(String label)
|
void |
setPreferredColumns(int nColumns)
|
void |
setPreferredRows(int nRows)
|
void |
setPreferredSize(Dimension size)
|
void |
setPropertyList(PropertyList list)
|
void |
setShortDescription(String description)
|
void |
setSlot(Slot slot)
|
void |
setup(WidgetDescriptor descriptor,
boolean isDesignTime,
Project project,
Cls cls,
Slot slot)
|
void |
setValues(Collection values)
|
void |
setWidgetValues()
|
void |
show(Cls cls,
Slot slot)
|
void |
showInstance(Instance instance)
|
String |
toString()
|
protected void |
updateBorder(Collection c)
this is a hack because these methods just belong in AbstractSlotWidget |
void |
valueChanged()
|
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus |
_AbstractWidget
public _AbstractWidget()
addButtonConfiguration
public void addButtonConfiguration(Action action)
addButtonConfiguration
public void addButtonConfiguration(Action action,
boolean defaultState)
addMainWindowToolBarButton
public JButton addMainWindowToolBarButton(Action action)
addSelectionListener
public void addSelectionListener(SelectionListener listener)
addWidgetListener
public void addWidgetListener(WidgetListener listener)
allowsMultipleValues
public boolean allowsMultipleValues()
canClose
public boolean canClose()
canSave
public boolean canSave()
clearSelection
public void clearSelection()
close
public void close()
configure
public boolean configure()
createLeftRightSplitPane
protected JSplitPane createLeftRightSplitPane(String locationPropertyName,
int defaultLocation)
createTopBottomSplitPane
protected JSplitPane createTopBottomSplitPane(String locationPropertyName,
int defaultLocation)
createWidgetConfigurationPanel
public WidgetConfigurationPanel createWidgetConfigurationPanel()
displayButton
protected boolean displayButton(String propertyName)
displayButton
public boolean displayButton(Action action)
dispose
public void dispose()
finalize
public void finalize()
- Overrides:
finalize
in class Object
getAssociatedCls
public Cls getAssociatedCls()
getButtonDescription
public String getButtonDescription(Action action)
getCls
public Cls getCls()
getDescriptor
public WidgetDescriptor getDescriptor()
getFirstItem
public static Object getFirstItem(Collection c)
getIcon
public Icon getIcon()
getInstance
public Instance getInstance()
getInvalidValueText
protected String getInvalidValueText(Collection values)
getKnowledgeBase
public KnowledgeBase getKnowledgeBase()
getLabel
public String getLabel()
getMainWindowMenuBar
public JMenuBar getMainWindowMenuBar()
getMaximumCardinality
protected int getMaximumCardinality()
getMinimumCardinality
protected int getMinimumCardinality()
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
getPreferredSize
in class JComponent
getProject
public Project getProject()
getPropertyList
public PropertyList getPropertyList()
getSelection
public Collection getSelection()
getShortDescription
public String getShortDescription()
getSlot
public Slot getSlot()
getStringProperty
public String getStringProperty(String name,
String defaultString)
getValues
public Collection getValues()
handleBrowserTextChanged
protected void handleBrowserTextChanged()
handleFrameNameChanged
protected void handleFrameNameChanged()
handleOwnSlotValueChanged
protected void handleOwnSlotValueChanged(Slot slot)
isDesignTime
public boolean isDesignTime()
isRuntime
public boolean isRuntime()
isSlotAtCls
public boolean isSlotAtCls()
isSuitable
public static boolean isSuitable(Cls cls,
Slot slot,
Facet facet)
loadValues
public void loadValues()
notifySelectionListeners
public void notifySelectionListeners()
postWidgetEvent
public void postWidgetEvent(int type)
removeMainWindowToolBarButton
public void removeMainWindowToolBarButton(JButton button)
removeSelectionListener
public void removeSelectionListener(SelectionListener listener)
removeWidgetListener
public void removeWidgetListener(WidgetListener listener)
reshape
public void reshape(int x,
int y,
int w,
int h)
- Overrides:
reshape
in class JComponent
save
public void save()
setAllowed
protected static void setAllowed(AllowableAction action,
boolean state)
setAssociatedCls
public void setAssociatedCls(Cls cls)
setCls
public void setCls(Cls cls)
setEditable
public void setEditable(boolean b)
setIcon
public void setIcon(Icon icon)
setInstance
public void setInstance(Instance newInstance)
setInstance
public void setInstance(Slot newSlotInstance,
Cls newAssociatedCls)
setInstanceValues
public void setInstanceValues()
setLabel
public void setLabel(String label)
setPreferredColumns
public void setPreferredColumns(int nColumns)
setPreferredRows
public void setPreferredRows(int nRows)
setPreferredSize
public void setPreferredSize(Dimension size)
- Overrides:
setPreferredSize
in class JComponent
setPropertyList
public void setPropertyList(PropertyList list)
setShortDescription
public void setShortDescription(String description)
setSlot
public void setSlot(Slot slot)
setup
public void setup(WidgetDescriptor descriptor,
boolean isDesignTime,
Project project,
Cls cls,
Slot slot)
setValues
public void setValues(Collection values)
setWidgetValues
public void setWidgetValues()
show
public void show(Cls cls,
Slot slot)
showInstance
public void showInstance(Instance instance)
toString
public String toString()
- Overrides:
toString
in class Component
updateBorder
protected void updateBorder(Collection c)
- this is a hack because these methods just belong in AbstractSlotWidget
valueChanged
public void valueChanged()
Submit a bug report or feature request
Protege-2000 is a trademark of Stanford University.
Copyright (c) 1998-2002 Stanford University.