Protege 2.1.2

edu.stanford.smi.protegex.queries_tab
Interface SlotValueWidget

All Known Implementing Classes:
AbstractSlotValueWidget

public interface SlotValueWidget


Field Summary
static int HEIGHT
           
static int WIDTH
           
 
Method Summary
 void doTask(String type)
          Allow any other flexible process
 JComponent getComponent()
          Return the JComponent to show on screen.
 Object[] getData()
          Return an array of Objects that are shown in the widget.
 String getLabel()
          Return the label of the widget.
 String[] getSelectedItems()
          Returns the items currently selected in the JComponent.
 Object getSelectedObject()
          Return the selected Object.
 String getSlotName()
          Every widget is used to represent the value of s specific slot.
 QueriesTab getTab()
          Get the tab.
 JComponent getWidget()
          Return the JComponent to hold the data.
 void initialized()
          Called after project and kb are set.
 boolean isComplete()
          whether the seach is done or not
 boolean isSlotSingleValued()
          If is a single value slot, set as true.
 boolean isViewEnabled()
           
 boolean isVisible()
          get visible
 void removeListener()
           
 void removeMouse()
           
 Collection search()
          Performs the search for the specified string with the given search context.
 Collection search(Collection instances, Slot slot, String operation, Object obj)
          This is used to call for the Query settings.
 void setActionsEnabled(boolean b)
           
 void setCls(Cls cls)
          Setup the selected cls
 void setData(Object[] data)
          An array of Objects are passed in that should be displayed.
 void setDisplayName(String name)
           
 void setInstances(Collection instances)
          Setup the instances collection
 void setProject(Project proj)
          Each widget will have a pointer to the project so it can interact with the Protege knowledge base.
 void setSelectedObject(Object obj)
          Set the displayed selected object.
 void setSpecification(SlotSpecification spec)
          Setup the search specification.
 void setViewEnabled(boolean b)
           
 void setVisible(boolean visible)
          Set visible
 

Field Detail

WIDTH

public static final int WIDTH
See Also:
Constant Field Values

HEIGHT

public static final int HEIGHT
See Also:
Constant Field Values
Method Detail

doTask

public void doTask(String type)
Allow any other flexible process


getComponent

public JComponent getComponent()
Return the JComponent to show on screen.


getData

public Object[] getData()
Return an array of Objects that are shown in the widget.


getLabel

public String getLabel()
Return the label of the widget.


getSelectedItems

public String[] getSelectedItems()
Returns the items currently selected in the JComponent. For a text box, it may be the selected text, or for a list box the selected items in the list. For single valued slots (as compared to multiple valued slots), just return an array of size one.


getSelectedObject

public Object getSelectedObject()
Return the selected Object.


getSlotName

public String getSlotName()
Every widget is used to represent the value of s specific slot.


getTab

public QueriesTab getTab()
Get the tab.


getWidget

public JComponent getWidget()
Return the JComponent to hold the data.


initialized

public void initialized()
Called after project and kb are set.


isComplete

public boolean isComplete()
whether the seach is done or not


isSlotSingleValued

public boolean isSlotSingleValued()
If is a single value slot, set as true.


isViewEnabled

public boolean isViewEnabled()

isVisible

public boolean isVisible()
get visible


removeListener

public void removeListener()

removeMouse

public void removeMouse()

search

public Collection search()
Performs the search for the specified string with the given search context. SetData will be called shortly later with the same array of strings to be displayed, so it is not necessary to update the display yet.


search

public Collection search(Collection instances,
                         Slot slot,
                         String operation,
                         Object obj)
This is used to call for the Query settings.


setActionsEnabled

public void setActionsEnabled(boolean b)

setCls

public void setCls(Cls cls)
Setup the selected cls


setData

public void setData(Object[] data)
An array of Objects are passed in that should be displayed. After search is called, the array of objects returned will be passed to setData to be displayed. This will also be called when the back and forward buttons are pressed to reset the screen from the history.


setDisplayName

public void setDisplayName(String name)

setInstances

public void setInstances(Collection instances)
Setup the instances collection


setProject

public void setProject(Project proj)
Each widget will have a pointer to the project so it can interact with the Protege knowledge base.


setSelectedObject

public void setSelectedObject(Object obj)
Set the displayed selected object.


setSpecification

public void setSpecification(SlotSpecification spec)
Setup the search specification.


setViewEnabled

public void setViewEnabled(boolean b)

setVisible

public void setVisible(boolean visible)
Set visible


Protege 2.1.2

Submit a bug report or feature request