org.pm4j.core.pm.impl
Class PmTabSetImpl

java.lang.Object
  extended by org.pm4j.core.pm.impl.PmObjectBase
      extended by org.pm4j.core.pm.impl.PmDataInputBase
          extended by org.pm4j.core.pm.impl.PmElementBase
              extended by org.pm4j.core.pm.impl.PmElementImpl
                  extended by org.pm4j.core.pm.impl.PmTabSetImpl
All Implemented Interfaces:
java.lang.Comparable<PmObject>, PmDataInput, PmElement, PmObject, PmTabSet, PmTreeNode

public class PmTabSetImpl
extends PmElementImpl
implements PmTabSet

Basic implementation of a PmTabSet.

Author:
olaf boede

Nested Class Summary
 
Nested classes/interfaces inherited from class org.pm4j.core.pm.impl.PmObjectBase
PmObjectBase.MetaData, PmObjectBase.NameBuilder, PmObjectBase.NameBuilderAbsoluteName, PmObjectBase.NameBuilderShortName, PmObjectBase.NameBuilderTitle
 
Field Summary
 
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
PmTabSetImpl()
          Default constructor (for some dependency injection scenarios).
PmObjectBase.setPmParent(PmObject) needs to be called before the instance can be used.
PmTabSetImpl(PmObject pmParent)
           
 
Method Summary
 void addTabSwitchCommandDecorator(PmElement fromTab, PmElement toTab, PmCommandDecorator decorator)
          Adds a PmCommandDecorator to be executed before a tab switch.
 PmTabSetConnector getPmToTabSetViewConnector()
           
protected  void onPmInit()
          Gets called when the meta data part of this PM is initialized and assigned to this instance.
 boolean switchToTabPm(PmElement fromTab, PmElement toTab)
          This method gets called whenever the user or internal UI logic attempts to switch from one opened tab to another one.
protected  boolean switchToTabPmImpl(PmElement fromTab, PmElement toTab)
          Subclasses may define here their specific UI logic here.
 
Methods inherited from class org.pm4j.core.pm.impl.PmElementBase
accept, clearCachedPmValues, findAnnotationsInPmHierarchy, getNodeDetailsPm, getPmAttribute, getPmAttributes, getPmChildNodes, getPmChildNodesImpl, getPmConversation, getPmKey, isPmReadonlyImpl, isPmTreeLeaf, isValidatingOnSetPmValue, makeMetaData
 
Methods inherited from class org.pm4j.core.pm.impl.PmDataInputBase
commitBufferedPmChanges, isBufferedPmValueMode, isPmValueChanged, pmValidate, resetPmValues, rollbackBufferedPmChanges
 
Methods inherited from class org.pm4j.core.pm.impl.PmObjectBase
addToPmComposite, canSetPmTitle, clearPmInvalidValues, compareTo, ensurePmMetaDataInitialization, getPmConversationImpl, getPmIconPath, getPmMetaData, getPmMetaDataWithoutPmInitCall, getPmName, getPmParent, getPmProperty, getPmRelativeName, getPmResKey, getPmResKeyBase, getPmResLoaderCtxtClasses, getPmShortTitle, getPmStyleClasses, getPmStyleClassesImpl, getPmTitle, getPmTitleDef, getPmTitleImpl, getPmTooltip, getPmTooltipImpl, getVisiblePmCommands, getVisiblePmCommands, initMetaData, isMetaDataInitialized, isPmEnabled, isPmEnabledImpl, isPmReadonly, isPmValid, isPmVisible, isPmVisibleImpl, onPmChildStateChange, onPmValueChange, readCacheStrategy, removePmChild, setPmEnabled, setPmParent, setPmProperty, setPmTitle, setPmVisible, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pm4j.core.pm.PmElement
getPmAttribute, getPmAttributes, getPmKey
 
Methods inherited from interface org.pm4j.core.pm.PmDataInput
commitBufferedPmChanges, isBufferedPmValueMode, isPmValueChanged, pmValidate, resetPmValues, rollbackBufferedPmChanges
 
Methods inherited from interface org.pm4j.core.pm.PmTreeNode
getNodeDetailsPm, getPmChildNodes, isPmTreeLeaf
 
Methods inherited from interface org.pm4j.core.pm.PmObject
accept, canSetPmTitle, compareTo, getPmConversation, getPmIconPath, getPmName, getPmParent, getPmProperty, getPmRelativeName, getPmShortTitle, getPmStyleClasses, getPmTitle, getPmTooltip, isPmEnabled, isPmReadonly, isPmValid, isPmVisible, setPmEnabled, setPmParent, setPmProperty, setPmTitle, setPmVisible
 

Constructor Detail

PmTabSetImpl

public PmTabSetImpl()
Default constructor (for some dependency injection scenarios).
PmObjectBase.setPmParent(PmObject) needs to be called before the instance can be used.


PmTabSetImpl

public PmTabSetImpl(PmObject pmParent)
Method Detail

onPmInit

protected void onPmInit()
Description copied from class: PmObjectBase
Gets called when the meta data part of this PM is initialized and assigned to this instance.

Overrides:
onPmInit in class PmObjectBase

addTabSwitchCommandDecorator

public void addTabSwitchCommandDecorator(PmElement fromTab,
                                         PmElement toTab,
                                         PmCommandDecorator decorator)
Adds a PmCommandDecorator to be executed before a tab switch.

Parameters:
fromTab - The from-tab to define the decorator for. If it is null, the decorator will be active for all from-tabs.
toTab - The to-tab to define the decorator for. If it is null, the decorator will be active for all to-tabs.
decorator - The decorator logic to be executed before the tab switch.

switchToTabPm

public boolean switchToTabPm(PmElement fromTab,
                             PmElement toTab)
Description copied from interface: PmTabSet
This method gets called whenever the user or internal UI logic attempts to switch from one opened tab to another one.

This method may prevent the tab switch operation by returning false.

ATTENTION: This method is not intended for overriding!
Please define specific tab switch logic by overriding switchToTabPmImpl(PmElement, PmElement).

Specified by:
switchToTabPm in interface PmTabSet
Parameters:
fromTab - The currently opened tab.
toTab - The tab to switch to.
Returns:
true if the PM logic implementation allows the tab switch.
false if the PM logic implementation prevents the tab switch.

switchToTabPmImpl

protected boolean switchToTabPmImpl(PmElement fromTab,
                                    PmElement toTab)
Subclasses may define here their specific UI logic here.

The default implementation always allows to switch the tab.

Internally this method gets called by the PmTabChangeCommand.


getPmToTabSetViewConnector

public PmTabSetConnector getPmToTabSetViewConnector()
Returns:
A view technology specific tab set logic connector.