|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.psika.numerist.Manager
public final class Manager
Manager for diagrams and corresponding entries.
Nested Class Summary | |
---|---|
static class |
Manager.SORT_ORDER
Sorting order. |
static class |
Manager.SORT_TYPE
Type of sorting. |
Nested classes/interfaces inherited from interface cz.psika.numerist.Constants |
---|
Constants.ItemEvents |
Field Summary |
---|
Method Summary | |
---|---|
void |
addDiagram(Item item,
boolean insideContentArea,
boolean insideThumbnailArea)
Append diagram into panels. |
boolean |
currentSortingOrderAscending()
Get sorting order currently set. |
void |
deleteAll()
Delete all items and diagrams. |
void |
deleteSelected()
Deleting of items marked as selected. |
void |
dragDiagram(java.awt.dnd.DragGestureEvent dge)
Dragging the diagram. |
void |
dropDiagram(java.awt.dnd.DropTargetDropEvent dtde)
Dropping the diagram. |
Diagram[] |
findDiagrams(Entry search)
Find visible thumbnail and/or full diagram by it's entry. |
Diagram |
getDiagram(Item item,
boolean isThumbnail)
Fetch diagram for this concrete item. |
Diagram |
getDiagramCopy(Item item,
boolean isThumbnail)
Get diagram copy for the item. |
static Manager |
getInstance()
Returns singleton instance. |
int |
getNumberOfItems()
Get current number of items. |
java.util.Iterator<Item> |
itemsIterator()
Get iterator over all items. |
void |
refreshThumbnails()
Refresh thumbnails when free space should be available inside thumbnail are, useful especially after window maximization. |
void |
refreshThumbnails(Item startItem)
Refresh the thumbnail area. |
Entry |
registerEntry(java.lang.String entryString,
Style entryStyle)
Register new entry within collection. |
void |
reverseItems()
Reverse items inside the collection and toggle current sorting order. |
void |
rotateThumbnails(int count)
Rotating thumbnails. |
int |
selectedItems()
Returns number of selected items. |
boolean |
setEntriesFromFile(java.lang.String filename)
Load entries from file and set thumbnails. |
void |
sortItems(Manager.SORT_TYPE sortType,
boolean ascending)
Sort items according to selected sorting criteria. |
void |
update(ItemObservable observable,
Constants.ItemEvents event)
Updating the observable item. |
void |
updateNoOfItemsSelected(boolean increment)
Update number of selected items. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Manager getInstance()
public Entry registerEntry(java.lang.String entryString, Style entryStyle)
Vector
of Item
s.
entryString
- input textentryStyle
- input style
Entry
object registeredpublic java.util.Iterator<Item> itemsIterator()
public int getNumberOfItems()
public Diagram getDiagram(Item item, boolean isThumbnail)
item
- isThumbnail
- thumbnail flag
public Diagram getDiagramCopy(Item item, boolean isThumbnail)
item
- isThumbnail
- thumbnail flag
public boolean setEntriesFromFile(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
filename
-
false
on fatal error
java.io.IOException
- on some i/o error
java.io.FileNotFoundException
- when file not foundpublic boolean currentSortingOrderAscending()
true
when ascending order is activepublic void sortItems(Manager.SORT_TYPE sortType, boolean ascending)
sortType
- type of sortingascending
- true
to set ascending sorting orderreverseItems()
public void reverseItems()
public void addDiagram(Item item, boolean insideContentArea, boolean insideThumbnailArea)
item
- insideContentArea
- add diagram into main content areainsideThumbnailArea
- add diagram into thumbnail areapublic void refreshThumbnails(Item startItem)
startItem
- set this item into the first position, or null
public void refreshThumbnails()
public Diagram[] findDiagrams(Entry search)
search
- item to search
public void rotateThumbnails(int count)
count
- positive values means rotation of count items in the right direction,
else the same count of rotations in the opposite directionpublic void deleteAll()
public void updateNoOfItemsSelected(boolean increment)
increment
- true
on selection, false
otherwisepublic int selectedItems()
public void deleteSelected()
public void dragDiagram(java.awt.dnd.DragGestureEvent dge)
dge
- drag eventpublic void dropDiagram(java.awt.dnd.DropTargetDropEvent dtde)
dtde
- drop eventpublic void update(ItemObservable observable, Constants.ItemEvents event)
update
in interface ItemObserver
observable
- item or diagram to updateevent
- type of eventConstants.ItemEvents
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |