Class CmsEditProperties.PropertyEditingContext
- java.lang.Object
-
- org.opencms.gwt.client.ui.contextmenu.CmsEditProperties.PropertyEditingContext
-
- Enclosing class:
- CmsEditProperties
public static class CmsEditProperties.PropertyEditingContext extends java.lang.Object
Helper class which encapsulates the differences between the contexts where the property edit dialog is opened.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Runnable
m_cancelHandler
The cancel handler.protected CmsFormDialog
m_formDialog
The dialog instance.protected I_CmsFormHandler
m_formHandler
The form handler.
-
Constructor Summary
Constructors Constructor Description PropertyEditingContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowCreateProperties()
Returns true if the property definition button should be enabled.CmsPropertyDefinitionButton
createPropertyDefinitionButton()
Creates the property definition button.CmsFormDialog
getDialog()
Gets the form dialog.I_CmsPropertySaver
getPropertySaver()
Gets the property saver.void
initCloseHandler()
Initializes the close handler of the dialog.boolean
isFocusNameField()
Return true if the file name field should be focused after opening the dialog.void
setAllowCreateProperties(boolean allowCreateProperties)
Enables / disables the 'define property' functionality.void
setCancelHandler(java.lang.Runnable cancelHandler)
Sets the cancel handler.void
setDialog(CmsFormDialog formDialog)
Sets the form dialog.void
setFocusNameField(boolean focusNameField)
Enables / disables focusing on the name field.void
setFormHandler(I_CmsFormHandler formHandler)
Sets the form handler.void
setMultiFileNavigation(CmsEditProperties.I_MultiFileNavigation nav)
Sets the file navigation object.void
setPropertySaver(I_CmsPropertySaver saver)
Sets the property saver.void
setRestart(java.lang.Runnable command)
Sets the restart command (used to open the property dialog again after a secondary dialog).
-
-
-
Field Detail
-
m_cancelHandler
protected java.lang.Runnable m_cancelHandler
The cancel handler.
-
m_formDialog
protected CmsFormDialog m_formDialog
The dialog instance.
-
m_formHandler
protected I_CmsFormHandler m_formHandler
The form handler.
-
-
Constructor Detail
-
PropertyEditingContext
public PropertyEditingContext()
-
-
Method Detail
-
allowCreateProperties
public boolean allowCreateProperties()
Returns true if the property definition button should be enabled.- Returns:
- true if the user should be able to define new properties
-
createPropertyDefinitionButton
public CmsPropertyDefinitionButton createPropertyDefinitionButton()
Creates the property definition button.- Returns:
- the property definition button
-
getDialog
public CmsFormDialog getDialog()
Gets the form dialog.- Returns:
- the form dialog
-
getPropertySaver
public I_CmsPropertySaver getPropertySaver()
Gets the property saver.- Returns:
- the property saver
-
initCloseHandler
public void initCloseHandler()
Initializes the close handler of the dialog.
-
isFocusNameField
public boolean isFocusNameField()
Return true if the file name field should be focused after opening the dialog.- Returns:
- true if the file name field should be focused
-
setAllowCreateProperties
public void setAllowCreateProperties(boolean allowCreateProperties)
Enables / disables the 'define property' functionality.- Parameters:
allowCreateProperties
- true if the user should be able to create new properties
-
setCancelHandler
public void setCancelHandler(java.lang.Runnable cancelHandler)
Sets the cancel handler.- Parameters:
cancelHandler
- the cancel handler
-
setDialog
public void setDialog(CmsFormDialog formDialog)
Sets the form dialog.- Parameters:
formDialog
- the form dialog
-
setFocusNameField
public void setFocusNameField(boolean focusNameField)
Enables / disables focusing on the name field.- Parameters:
focusNameField
- true if the file name field should be focused after opening the dialog
-
setFormHandler
public void setFormHandler(I_CmsFormHandler formHandler)
Sets the form handler.- Parameters:
formHandler
- the form handler
-
setMultiFileNavigation
public void setMultiFileNavigation(CmsEditProperties.I_MultiFileNavigation nav)
Sets the file navigation object.- Parameters:
nav
- the file navigation object
-
setPropertySaver
public void setPropertySaver(I_CmsPropertySaver saver)
Sets the property saver.- Parameters:
saver
- the property saver
-
setRestart
public void setRestart(java.lang.Runnable command)
Sets the restart command (used to open the property dialog again after a secondary dialog).- Parameters:
command
- the restart command
-
-