org.pm4j.core.pm.impl.commands
Class PmCommandSeparator

java.lang.Object
  extended by org.pm4j.core.pm.impl.PmObjectBase
      extended by org.pm4j.core.pm.impl.PmCommandImpl
          extended by org.pm4j.core.pm.impl.commands.PmCommandSeparator
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<PmObject>, PmCommand, PmObject

public class PmCommandSeparator
extends PmCommandImpl

A command separator.

Author:
olaf boede

Nested Class Summary
 
Nested classes/interfaces inherited from class org.pm4j.core.pm.impl.PmCommandImpl
PmCommandImpl.MetaData
 
Nested classes/interfaces inherited from class org.pm4j.core.pm.impl.PmObjectBase
PmObjectBase.NameBuilder, PmObjectBase.NameBuilderAbsoluteName, PmObjectBase.NameBuilderShortName, PmObjectBase.NameBuilderTitle
 
Nested classes/interfaces inherited from interface org.pm4j.core.pm.PmCommand
PmCommand.CmdKind, PmCommand.CommandSet, PmCommand.CommandState
 
Field Summary
 
Fields inherited from class org.pm4j.core.pm.impl.PmCommandImpl
NAVI_PARAM_NEXT_DLG_PM, PERFORMED_REDIRECT
 
Fields inherited from class org.pm4j.core.pm.impl.PmObjectBase
pmCacheLog
 
Fields inherited from interface org.pm4j.core.pm.PmObject
STYLE_CLASS_DISABLED, STYLE_CLASS_ERROR, STYLE_CLASS_INFO, STYLE_CLASS_REQUIRED, STYLE_CLASS_WARN
 
Constructor Summary
PmCommandSeparator(PmObject pmParent)
          Creates a command separator.
 
Method Summary
static java.util.List<PmCommand> filterVisibleCommandsAndSeparators(java.util.List<PmCommand> allCommands)
          Provides only the visible commands and separators.
protected  void initMetaData(PmObjectBase.MetaData staticData)
          Defines the specific command kind.
protected  boolean isPmEnabledImpl()
          The default implementation checks the own enabled flag and the enablement of its parent context element.
 
Methods inherited from class org.pm4j.core.pm.impl.PmCommandImpl
accept, actionReturnOnFailure, addCommandDecorator, afterDo, beforeDo, clone, doIt, doIt, doItImpl, doItReturnNextDlgPm, doItReturnString, doItReturnVoid, getCmdKind, getCommandState, getNavigateBackLink, getNaviLink, getNaviLinkImpl, getParentCommands, getUndoCommand, getVetoCommandDecorator, getVisiblePmCommands, isASubCommandEnabled, isASubCommandVisible, isPmVisibleImpl, isRequiresValidValues, makeMetaData, makeOptionalSuccessMsg, navigateBack, navigateTo, setNaviLink, setUndoCommand, validate
 
Methods inherited from class org.pm4j.core.pm.impl.PmObjectBase
addToPmComposite, canSetPmTitle, clearCachedPmValues, clearPmInvalidValues, compareTo, ensurePmMetaDataInitialization, findAnnotationsInPmHierarchy, getPmConversation, getPmConversationImpl, getPmIconPath, getPmMetaData, getPmMetaDataWithoutPmInitCall, getPmName, getPmParent, getPmProperty, getPmRelativeName, getPmResKey, getPmResKeyBase, getPmResLoaderCtxtClasses, getPmShortTitle, getPmStyleClasses, getPmStyleClassesImpl, getPmTitle, getPmTitleDef, getPmTitleImpl, getPmTooltip, getPmTooltipImpl, getVisiblePmCommands, isMetaDataInitialized, isPmEnabled, isPmReadonly, isPmReadonlyImpl, isPmValid, isPmVisible, onPmChildStateChange, onPmInit, onPmValueChange, readCacheStrategy, removePmChild, setPmEnabled, setPmParent, setPmProperty, setPmTitle, setPmVisible, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pm4j.core.pm.PmObject
canSetPmTitle, compareTo, getPmConversation, getPmIconPath, getPmName, getPmParent, getPmProperty, getPmRelativeName, getPmShortTitle, getPmStyleClasses, getPmTitle, getPmTooltip, isPmEnabled, isPmReadonly, isPmValid, isPmVisible, setPmEnabled, setPmParent, setPmProperty, setPmTitle, setPmVisible
 

Constructor Detail

PmCommandSeparator

public PmCommandSeparator(PmObject pmParent)
Creates a command separator.

Parameters:
pmParent - The presentation model it acts for.
Method Detail

isPmEnabledImpl

protected boolean isPmEnabledImpl()
Description copied from class: PmCommandImpl
The default implementation checks the own enabled flag and the enablement of its parent context element.

If the command is child of a command (group), the enablement of the first non-command parent will be checked.

Overrides:
isPmEnabledImpl in class PmCommandImpl

filterVisibleCommandsAndSeparators

public static java.util.List<PmCommand> filterVisibleCommandsAndSeparators(java.util.List<PmCommand> allCommands)
Provides only the visible commands and separators.

Parameters:
allCommands - The set of available commands and separators.
Returns:
Only the visible commands and separators to display.

initMetaData

protected void initMetaData(PmObjectBase.MetaData staticData)
Defines the specific command kind.

Overrides:
initMetaData in class PmCommandImpl