org.opencms.workplace.editors.directedit
Class CmsDirectEditMode

java.lang.Object
  extended byorg.opencms.workplace.editors.directedit.CmsDirectEditMode

public final class CmsDirectEditMode
extends java.lang.Object

Constants to indicate which mode to use for placement of the HTML that generates the direct edit buttons.

There are 3 basic options for the direct edit mode:

There is one global option set for the page / template. The default is AUTO.

There is an additional constant TRUE that means "use the default mode of the page / template".

It is possible to switch modes for an individual content loop. This is intended to use with XmlContents that require special placement of the direct edit HTML because the default placement does not give good results.

Since:
6.2.3
Version:
$Revision: 1.5 $
Author:
Alexander Kandzior

Field Summary
static CmsDirectEditMode AUTO
          Indicates automatic placement of direct edit HTML.
static CmsDirectEditMode FALSE
          Indicates direct edit is disabled.
static CmsDirectEditMode MANUAL
          Indicates manual placement of direct edit HTML.
static CmsDirectEditMode TRUE
          Indicates direct edit HTML is to be generated according to the default setting of the current page.
 
Method Summary
 int getMode()
          Returns this modes int value.
 boolean isEnabled()
          Returns true in case this mode indicates direct edit is enabled.
 java.lang.String toString()
           
static CmsDirectEditMode valueOf(boolean value)
          Returns TRUE in case the given value is true, FALSE otherwise.
static CmsDirectEditMode valueOf(int mode)
          Returns the mode constant for the selected direct edit int mode.
static CmsDirectEditMode valueOf(java.lang.String value)
          Returns the mode constant for the selected direct edit String mode description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTO

public static final CmsDirectEditMode AUTO
Indicates automatic placement of direct edit HTML.


FALSE

public static final CmsDirectEditMode FALSE
Indicates direct edit is disabled.


MANUAL

public static final CmsDirectEditMode MANUAL
Indicates manual placement of direct edit HTML.


TRUE

public static final CmsDirectEditMode TRUE
Indicates direct edit HTML is to be generated according to the default setting of the current page.

Method Detail

valueOf

public static CmsDirectEditMode valueOf(boolean value)
Returns TRUE in case the given value is true, FALSE otherwise.

Parameters:
value - the direct edit mode to get the constant for
Returns:
TRUE in case the given value is true, FALSE otherwise

valueOf

public static CmsDirectEditMode valueOf(int mode)
Returns the mode constant for the selected direct edit int mode.

The possible value are:

Parameters:
mode - the direct edit int mode to get the constant for
Returns:
the mode constant for the selected direct edit int mode

valueOf

public static CmsDirectEditMode valueOf(java.lang.String value)
Returns the mode constant for the selected direct edit String mode description.

For a mode instance A, toString() returns the String mode description.

Parameters:
value - the direct edit String mode description to get the constant for
Returns:
the mode constant for the selected direct edit String mode description

getMode

public int getMode()
Returns this modes int value.

Returns:
this modes int value
See Also:
valueOf(int)

isEnabled

public boolean isEnabled()
Returns true in case this mode indicates direct edit is enabled.

Direct edit is enabled if this mode is not FALSE, which is identical to getMode() > 0.

Returns:
true in case this mode indicates direct edit is enabled

toString

public java.lang.String toString()
See Also:
Object.toString(), valueOf(String)