public interface IlvSymbologyTreeViewActions extends IlvPersistentSDMNodeFactory
IlvSymbologyTreeViewActions
provides the actions to create
symbols, edit symbols or edit the entire symbology. It must be installed at
the IlvSymbologyTreeView
to make the symbology editable by
the tree view.
Note: This class was in the ilog.views.maps.defense.symbology.swing
package
in previous versions of JViews Maps for Defense.
Modifier and Type | Method and Description |
---|---|
void |
actOnSymbologyChanged()
Should be called by the symbology editors when symbology has changed.
|
void |
createGroup(IlvSDMModel model,
Object parentgroup,
IlvApplyObject applier)
Creates a new group interactively.
|
void |
createSymbol(IlvSDMModel model,
Object group,
IlvApplyObject applier)
Creates a new symbol interactively.
|
Object |
dropSymbolAt(IlvSDMModel model,
Object data,
Double lonRad,
Double latRad)
Acts on symbol data dropped on the view.
|
Object |
duplicateSymbol(IlvSDMModel model,
Object node)
Duplicates the input symbol.
|
void |
editGroup(IlvSDMModel model,
Object group,
IlvApplyObject applier)
Edits a specific group.
|
void |
editSymbol(IlvSDMModel model,
Object node,
IlvApplyObject applier)
Edits a specific symbol.
|
void |
editSymbology(IlvSDMModel model,
IlvApplyObject applier)
Edits the entire symbology as a whole.
|
boolean |
isCreateGroupEnabled(IlvSDMModel model)
Returns
true if the method createGroup is
enabled. |
boolean |
isCreateSymbolEnabled(IlvSDMModel model)
Returns
true if the method createSymbol is
enabled. |
boolean |
isDuplicateSymbolEnabled(IlvSDMModel model)
Returns
true if the method duplicateSymbol is
enabled. |
boolean |
isEditGroupEnabled(IlvSDMModel model)
Returns
true if the method editGroup is
enabled. |
boolean |
isEditSymbolEnabled(IlvSDMModel model)
Returns
true if the method editSymbol is
enabled. |
boolean |
isEditSymbologyEnabled(IlvSDMModel model)
Returns
true if the method editSymbology is
enabled. |
void |
setView(IlvSymbologyTreeView view)
Sets the symbology tree view that uses these actions.
|
getPersistentContext, isPropertyIgnored, newSymbol, setPersistentContext
void setView(IlvSymbologyTreeView view)
view
- symbology tree viewvoid editSymbology(IlvSDMModel model, IlvApplyObject applier)
model
- The symbol model of the symbologyapplier
- The apply object to be called when the symbology changesboolean isEditSymbologyEnabled(IlvSDMModel model)
true
if the method editSymbology
is
enabled.model
- The symbol modeltrue
if the operation is allowedvoid createSymbol(IlvSDMModel model, Object group, IlvApplyObject applier)
model.createNode()
to create the new symbol and sets the symbol properties. It adds the new
symbol using model.addObject
and sets its group using
model.setGroup
. Finally, it must call
applier.apply(null, symbol)
to update the symbol tree
panel.
Here is a simple sample implementation:
public void createSymbol(IlvSDMModel model, Object group, IlvApplyObject applier) { Object node = newSymbol("symbol"); model.setObjectProperty(node, "name", "NewSymbol"); model.addObject(node, null, null); model.setGroup(node, group); applier.apply(null, node); }
model
- The symbol model to which the new symbol will belonggroup
- The group of the new symbol or null
applier
- The apply object to be called when the symbol is createdboolean isCreateSymbolEnabled(IlvSDMModel model)
true
if the method createSymbol
is
enabled.model
- The symbol modeltrue
if the operation is allowedvoid createGroup(IlvSDMModel model, Object parentgroup, IlvApplyObject applier)
model.createGroup()
to create the new group and sets the group properties. It adds the new
group using model.addRootGroup
or model.setGroup
.
Finally, it must call applier.apply(null, symbol)
to
update the symbol tree panel.
Here is a simple sample implementation:
public void createGroup(IlvSDMModel model, IlvApplyObject applier) { Object group = model.createGroup("group"); model.setObjectProperty(group, "name", "NewGroup"); if (parentGroup == null) model.addRootGroup(group); else model.setGroup(group, parentGroup); applier.apply(null, group); }
model
- The symbol model to which the new group will belongparentgroup
- The parent group of the new group, or null
applier
- The apply object to be called when the group is createdboolean isCreateGroupEnabled(IlvSDMModel model)
true
if the method createGroup
is
enabled.model
- The symbol modeltrue
if the operation is allowedvoid editSymbol(IlvSDMModel model, Object node, IlvApplyObject applier)
applier.apply(null, symbol)
.
Here is a simple sample implementation:
public void editSymbol(IlvSDMModel model, Object node, IlvApplyObject applier) { model.setObjectProperty(node, "name", "NewName"); applier.apply(null, node); }
model
- The symbol model to which the symbol will belong.node
- The symbol model node to be edited.applier
- The apply object to be called when the symbol is changed.boolean isEditSymbolEnabled(IlvSDMModel model)
true
if the method editSymbol
is
enabled.model
- The symbol modeltrue
if the operation is allowedvoid editGroup(IlvSDMModel model, Object group, IlvApplyObject applier)
applier.apply(null, group)
.
Here is a simple sample implementation:
public void editGroup(IlvSDMModel model, Object group, IlvApplyObject applier) { model.setObjectProperty(group, "name", "NewGroupName"); applier.apply(null, group); }
model
- The symbol model to which the symbol will belonggroup
- The symbol model group to be editedapplier
- The apply object to be called when the group is changedboolean isEditGroupEnabled(IlvSDMModel model)
true
if the method editGroup
is
enabled.model
- The symbol modeltrue
if the operation is allowedObject duplicateSymbol(IlvSDMModel model, Object node)
model
- The symbol model to which the new symbol will belongnode
- The symbol model node to be duplicatedboolean isDuplicateSymbolEnabled(IlvSDMModel model)
true
if the method duplicateSymbol
is
enabled.model
- The symbol modeltrue
if the operation is allowedvoid actOnSymbologyChanged()
Object dropSymbolAt(IlvSDMModel model, Object data, Double lonRad, Double latRad)
model
- The model to drop symbol into.data
- Transferable data as per Transferable.getTransferData(java.awt.datatransfer.DataFlavor)
.lonRad
- Latitude in radians matching the mouse cursor for the drop.latRad
- Longitude in radians matching the mouse cursor for the drop.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.