public class DefaultModuleAction extends java.lang.Object implements IModuleAction
IModuleAction
interface.Constructor and Description |
---|
DefaultModuleAction(IModule module,
java.lang.String name,
java.lang.String label,
java.lang.String tooltip,
java.lang.String bitmapPath,
java.lang.String slotPattern,
java.lang.String slotImagePaths,
boolean needReadWriteObject,
boolean editTheModel,
IModuleCommandHandler command) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(MObject[] selectedElements) |
java.nio.file.Path |
getBitmapPath() |
IModuleCommandHandler |
getHandler() |
java.lang.String |
getLabel() |
IModule |
getModule() |
java.lang.String |
getName() |
java.nio.file.Path |
getSlotImagePath(int slotIndex) |
java.util.List<java.lang.String> |
getSlots() |
java.lang.String |
getTooltip() |
boolean |
isActiveFor(MObject[] selectedElements,
boolean readOnlyTool) |
boolean |
needReadWriteObject() |
void |
parseSlotImagePaths(java.lang.String slotImagePathPatterns) |
void |
parseSlotPattern(java.lang.String slotPattern) |
public DefaultModuleAction(IModule module, java.lang.String name, java.lang.String label, java.lang.String tooltip, java.lang.String bitmapPath, java.lang.String slotPattern, java.lang.String slotImagePaths, boolean needReadWriteObject, boolean editTheModel, IModuleCommandHandler command)
module
- the modulename
- the action namelabel
- the labeltooltip
- the tooltipbitmapPath
- the iconslotPattern
- the sub menu pathslotImagePaths
- the slot images pathneedReadWriteObject
- whether the target must be writeableeditTheModel
- whether the command modifies the modelcommand
- the command handlerpublic final boolean accept(MObject[] selectedElements)
accept
in interface IModuleAction
public java.nio.file.Path getBitmapPath()
getBitmapPath
in interface IModuleAction
public IModuleCommandHandler getHandler()
getHandler
in interface IModuleAction
public java.lang.String getLabel()
getLabel
in interface IModuleAction
public IModule getModule()
getModule
in interface IModuleAction
public java.lang.String getName()
getName
in interface IModuleAction
public java.nio.file.Path getSlotImagePath(int slotIndex)
getSlotImagePath
in interface IModuleAction
public java.util.List<java.lang.String> getSlots()
getSlots
in interface IModuleAction
public java.lang.String getTooltip()
getTooltip
in interface IModuleAction
public final boolean isActiveFor(MObject[] selectedElements, boolean readOnlyTool)
isActiveFor
in interface IModuleAction
public boolean needReadWriteObject()
needReadWriteObject
in interface IModuleAction
public void parseSlotPattern(java.lang.String slotPattern)
parseSlotPattern
in interface IModuleAction
public void parseSlotImagePaths(java.lang.String slotImagePathPatterns)
parseSlotImagePaths
in interface IModuleAction