T - the PDOs classpublic class DefaultGuiProvider<T extends PersistentDomainObject<T>> extends Object implements GuiProvider<T>
GuiProvider.| Constructor and Description |
|---|
DefaultGuiProvider(T pdo)
Creates a default GUI provider.
|
| Modifier and Type | Method and Description |
|---|---|
javafx.scene.input.Dragboard |
createDragboard(javafx.scene.Node node)
Creates the dragboard for the pdo.
|
PdoEditor<T> |
createEditor()
Creates a controller to edit or view this object.
|
PdoFinder<T> |
createFinder()
Creates a controller to search PDOs.
|
javafx.scene.image.ImageView |
createIcon()
Gets the PDO's icon.
The icon is displayed in trees, for example. |
TableConfiguration<T> |
createTableConfiguration()
Gets the tablename used in to initialize the table's gui.
|
FxTableView<T> |
createTableView()
Creates the table view for given configuration.
|
javafx.scene.control.TreeCell<T> |
createTreeCell()
Creates a tree cell for this type of pdo.
|
javafx.scene.control.TreeItem<T> |
createTreeItem()
Creates the tree item for this pdo.
|
void |
dropDragboard(javafx.scene.input.Dragboard dragbord)
Drops the dragboard on the pdo.
|
void |
dropPdo(PersistentDomainObject<?> pdoToDrop)
Drops the given PDO on the serviced pdo.
|
boolean |
editorExists()
Returns whether a controller exists to edit or view this object.
|
boolean |
finderExists()
Returns whether a finder exists to search for PDOs.
|
ResourceBundle |
getBundle()
Gets the resource bundle for this provider.
|
DomainContext |
getDomainContext() |
T |
getPdo() |
org.tentackle.misc.IdentifiableKey<PersistentDomainObject<?>> |
getPdoKeyFromDragboard(javafx.scene.input.Dragboard dragboard)
Gets the PDO key from the dragboard.
The method is provided to simplify implementing DND as only the methods isDragAccepted(javafx.scene.input.DragEvent) and dropPdo(org.tentackle.pdo.PersistentDomainObject<?>) need to be overridden. |
<P extends PersistentDomainObject<P>> |
getToolTipText(P parent)
Gets the tooltip text with respect to the parent object this
object is displayed in a tree.
|
<P extends PersistentDomainObject<P>> |
getTreeChildObjects(P parent)
Gets the childs with respect to the parent object this
object is displayed in the current tree.
|
int |
getTreeExpandMaxDepth()
Gets the maximum level of expansion allowed in a navigatable object tree.
The default is 0, i.e. |
<P extends PersistentDomainObject<P>> |
getTreeParentObjects(P parent)
Gets the parents with respect to the parent object this
object is displayed in the current tree.
|
T |
getTreeRoot()
Gets the object to be displayed in trees in place of this object.
|
<P extends PersistentDomainObject<P>> |
getTreeText(P parent)
Gets the tree text with respect to the parent object this
object is displayed in a tree.
|
boolean |
isDragAccepted(javafx.scene.input.DragEvent event)
Checks whether drag over the pdo is accepted.
|
boolean |
providesTreeChildObjects()
Determines whether this object may have child objects that should
be visible in a navigatable tree.
|
boolean |
providesTreeParentObjects()
Determines whether the navigatable object tree should show the
parents of this object.
Objects may be childs of different parents in terms of "being referenced from" or any other relation, for example: the warehouses this customer visited. |
void |
setPdo(T pdo) |
boolean |
stopTreeExpansion()
Determines whether tree explansion should stop at this object.
Sometimes treechilds should not be expanded if in a recursive "expand all". |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiton, oppublic DefaultGuiProvider(T pdo)
pdo - the PDOpublic ResourceBundle getBundle()
GuiProvidergetBundle in interface GuiProvider<T extends PersistentDomainObject<T>>public T getPdo()
getPdo in interface PdoHolder<T extends PersistentDomainObject<T>>public void setPdo(T pdo)
setPdo in interface PdoHolder<T extends PersistentDomainObject<T>>public DomainContext getDomainContext()
getDomainContext in interface DomainContextProviderpublic javafx.scene.image.ImageView createIcon()
GuiProvidercreateIcon in interface GuiProvider<T extends PersistentDomainObject<T>>public boolean editorExists()
GuiProvidereditorExists in interface GuiProvider<T extends PersistentDomainObject<T>>GuiProvider.createEditor()public PdoEditor<T> createEditor()
GuiProvidercreateEditor in interface GuiProvider<T extends PersistentDomainObject<T>>public boolean finderExists()
GuiProviderfinderExists in interface GuiProvider<T extends PersistentDomainObject<T>>public PdoFinder<T> createFinder()
GuiProvidercreateFinder in interface GuiProvider<T extends PersistentDomainObject<T>>public javafx.scene.input.Dragboard createDragboard(javafx.scene.Node node)
GuiProvidercreateDragboard in interface GuiProvider<T extends PersistentDomainObject<T>>node - the drag sourcepublic boolean isDragAccepted(javafx.scene.input.DragEvent event)
GuiProviderisDragAccepted in interface GuiProvider<T extends PersistentDomainObject<T>>event - the drag eventpublic org.tentackle.misc.IdentifiableKey<PersistentDomainObject<?>> getPdoKeyFromDragboard(javafx.scene.input.Dragboard dragboard)
isDragAccepted(javafx.scene.input.DragEvent) and dropPdo(org.tentackle.pdo.PersistentDomainObject<?>) need to be overridden.dragboard - the dragboardpublic void dropDragboard(javafx.scene.input.Dragboard dragbord)
GuiProviderdropDragboard in interface GuiProvider<T extends PersistentDomainObject<T>>dragbord - the dragboardpublic void dropPdo(PersistentDomainObject<?> pdoToDrop)
pdoToDrop - the PDO to droppublic TableConfiguration<T> createTableConfiguration()
GuiProvidercreateTableConfiguration in interface GuiProvider<T extends PersistentDomainObject<T>>public FxTableView<T> createTableView()
GuiProvidercreateTableView in interface GuiProvider<T extends PersistentDomainObject<T>>public boolean providesTreeChildObjects()
GuiProviderprovidesTreeChildObjects in interface GuiProvider<T extends PersistentDomainObject<T>>public <P extends PersistentDomainObject<P>> Collection<? extends PersistentDomainObject<?>> getTreeChildObjects(P parent)
GuiProvidergetTreeChildObjects in interface GuiProvider<T extends PersistentDomainObject<T>>P - the parent PDO typeparent - the parent object of this object in the tree, null = no parentpublic int getTreeExpandMaxDepth()
GuiProvidergetTreeExpandMaxDepth in interface GuiProvider<T extends PersistentDomainObject<T>>public boolean providesTreeParentObjects()
GuiProviderprovidesTreeParentObjects in interface GuiProvider<T extends PersistentDomainObject<T>>public <P extends PersistentDomainObject<P>> Collection<? extends PersistentDomainObject<?>> getTreeParentObjects(P parent)
GuiProvidergetTreeParentObjects in interface GuiProvider<T extends PersistentDomainObject<T>>P - the parent PDO typeparent - the parent object, null if no parentpublic T getTreeRoot()
GuiProvidergetTreeRoot in interface GuiProvider<T extends PersistentDomainObject<T>>public <P extends PersistentDomainObject<P>> String getTreeText(P parent)
GuiProvidergetTreeText in interface GuiProvider<T extends PersistentDomainObject<T>>P - the parent PDO typeparent - is the parent object, null if no parentpublic <P extends PersistentDomainObject<P>> String getToolTipText(P parent)
GuiProvidergetToolTipText in interface GuiProvider<T extends PersistentDomainObject<T>>P - the parent PDO typeparent - is the parent object, null if no parentpublic boolean stopTreeExpansion()
GuiProviderstopTreeExpansion in interface GuiProvider<T extends PersistentDomainObject<T>>public javafx.scene.control.TreeItem<T> createTreeItem()
GuiProvidercreateTreeItem in interface GuiProvider<T extends PersistentDomainObject<T>>public javafx.scene.control.TreeCell<T> createTreeCell()
GuiProvidercreateTreeCell in interface GuiProvider<T extends PersistentDomainObject<T>>Tentackle - distributed, domain- and model-driven