|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
cz.cuni.pogamut.posh.explorer.Explorer<T>
T - Type that is being crawled and also the type that will be returned in selection.public abstract class Explorer<T>
Panel for showing the results of crawling.
Crawler,
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
Explorer(Crawler<T> refreshCrawler)
|
|
| Method Summary | |
|---|---|
void |
crawledData(Crawler<T> crawler,
Collection<T> data)
Crawler has found new data, and they are now passed to the listeners. |
protected abstract Transferable |
createItemTransferable(T data)
Create new Transferable from item data. |
protected abstract Transferable |
createNewItemTransferable()
Create Transferable that is used when user drags and drops
node representing new item somewhere (presumably to scene). |
protected abstract void |
deleteItem(T item)
Delete item (e.g. |
protected abstract void |
displayItem(T item)
Display item in the editor. |
protected abstract boolean |
filter(String query,
boolean caseSensitive,
T item)
Method to filter items in the Explorer. |
void |
finished(Crawler<T> crawler,
boolean error)
Yay, crawler has finished!. |
protected abstract String |
getItemDescription(T item)
Get description of an item (to be used in the tootltip text). |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
|
protected abstract String |
getNewItemLabel()
Get label for new item action. |
protected abstract String |
getRenderedLabel(T item)
Get label of an result list item to be rendered. |
T |
getSelected()
|
void |
recrawlElements()
|
void |
started(Crawler<T> crawler)
Crawling has started, the crawler is working. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Explorer(Crawler<T> refreshCrawler)
| Method Detail |
|---|
public T getSelected()
protected abstract String getNewItemLabel()
protected abstract boolean filter(String query,
boolean caseSensitive,
T item)
Explorer. Whe user types something into
search box, explorer uses some implementation of this filter to determine
which items should be shown in the result window.
query - String query, what user typed into search windowcaseSensitive - Should the filtering be case sensitive?item - Item that will be evaluated if it should be filtered out or not
protected abstract String getRenderedLabel(T item)
item - Item that has survived filtration.
protected abstract String getItemDescription(T item)
item - Item in the result list
protected abstract Transferable createItemTransferable(T data)
Transferable from item data. Used in the
explorer for Drag and drop operation.
data - data that will be transfered, can be null
protected abstract Transferable createNewItemTransferable()
Transferable that is used when user drags and drops
node representing new item somewhere (presumably to scene). When
the transferable is asked for data,
it queries the user for the data and returns new item.
protected abstract void displayItem(T item)
item - Item to be displayedprotected abstract void deleteItem(T item)
Competence) from the plan, that may include
some questions to the user ("Are you sure?") .
item - Item to be deleted.
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
getListCellRendererComponent in interface ListCellRendererpublic void started(Crawler<T> crawler)
CrawlerListener
started in interface CrawlerListener<T>crawler - crawler that has started executing.
public void crawledData(Crawler<T> crawler,
Collection<T> data)
CrawlerListener
crawledData in interface CrawlerListener<T>crawler - crawler that has crawled new data
public void finished(Crawler<T> crawler,
boolean error)
CrawlerListener
finished in interface CrawlerListener<T>crawler - crawler that has finished.error - did crawler finsih because of error?public void recrawlElements()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||