Interface Editor
-
- All Superinterfaces:
GuiElement
- All Known Implementing Classes:
EditorImpl
public interface Editor extends GuiElement
Title: Editor.
Description: interface for the editor components in Microstrategy Web. The Editor GUI Element is responsible for producing a dialog like interface used by all the editors in the application. Its properties and methods allow the user to quiclky generate a dialog that follows the look and feel standards of Microstrategy Web. Instances of this interface are used by the
AbstractEditorTransform
to generate the application dialogs, but its usage is not limited to transform as any object capable of handling aMarkupOutput
can use this component. Instances to this component must be obtained through theGuiElementFactory
.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static int
APPLY_BUTTON
The property value of the Apply buttonstatic int
CANCEL_BUTTON
The property value of the Cancel buttonstatic int
OK_BUTTON
The property value of the OK button
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
appendDisplayFlag(int flag)
append some display flagTag
getActionButtonsBar()
Returns the TR tag that will be used to render the action buttons barWebEvent
getApplyEvent()
get the apply event for the editorjava.lang.String
getApplyJS()
Indicates JavaScript to be executed when applying changes current Editor.boolean
getCanAutoSize()
Returns true if the editor can auto size to show its contentsWebEvent
getCancelEvent()
get the cancel event for the editorjava.lang.String
getCancelJS()
Indicates JavaScript to be executed when canceling current Editor.WebEvent
getCloseEvent()
get the close event for the editorjava.lang.String
getCloseJS()
Indicates JavaScript to be executed when closing current Editor.MarkupOutput
getContents()
Returns the content of the editor.int
getDisplayFlags()
get the display flag for the editorWebEvent
getHelpEvent()
Deprecated.usegetHelpType()
java.lang.String
getHelpToolTip()
get the tooltip of the editorjava.lang.String
getHelpType()
get the type of the help fileWebEvent
getOkEvent()
get the ok event for the editorjava.lang.String
getOkJS()
Indicates JavaScript to be executed when clicking 'OK' button in current Editor.MarkupOutput
getPostButtonContents()
get the content after the apply/ok/cancel buttonsjava.lang.String
getTitle()
get the title of the editorMarkupOutput
getTitleElements()
get the title elements of the editorboolean
getUseDHTMLForEditorClose()
Returns true if we want to use DHTML code to close the editorboolean
hasSpaceAfterEditor()
whethere display a blank space underneath the editorboolean
isHideFocus()
gets the hide focus property of the buttons in the editorvoid
renderCloseButton(MarkupOutput out, WebEvent closeEvent, java.lang.String closeJS)
Renders the close button for an editorMarkupOutput
renderElement(java.lang.String cssClass)
render the gui element in a MarkupOutput objectvoid
renderHelpButton(MarkupOutput out)
Renders the help button for an editor.void
renderHelpButton(MarkupOutput out, WebEvent helpEvent, java.lang.String helpTopic)
Deprecated.void
setActionButtonsBar(Tag ab)
Sets the TR tag that will be used to render the action buttons barvoid
setApplyEvent(WebEvent event)
set the apply event for the editorvoid
setApplyJS(java.lang.String value)
Specifies JavaScript function to be invoked when applying changes for Editor in DHTML mode only.void
setApplyLabel(java.lang.String applyLabel)
set the apply label, which is displayed as the text of the apply buttonvoid
setApplyTooltip(java.lang.String applyTooltip)
set the apply tooltip, which is displayed as the text of the apply buttonvoid
setAttribute(java.lang.String attributeName, java.lang.String value, int location)
Set attributes on the location specified (EnumEditorSectionTypes.EditorMainDiv, EnumEditorSectionTypes.EditorTitleDiv, EnumEditorSectionTypes.EditorBodyDiv).void
setButtonDisabled(int button, boolean disableValue)
Set the disabled property of the specified button.void
setButtonsCss(java.lang.String css)
set the button css class name for the editorvoid
setCanAutoSize(boolean value)
Set to true if the editor can auto size to show its contentsvoid
setCancelEvent(WebEvent event)
set the cancel event for the editorvoid
setCancelJS(java.lang.String value)
Specifies JavaScript function to be invoked when canceling Editor in DHTML mode only.void
setCancelLabel(java.lang.String cancelLabel)
set the cancel label, which is displayed as the text of the cancel buttonvoid
setCancelTooltip(java.lang.String cancelLabel)
set the cancel tooltip, which is displayed as the text of the cancel buttonvoid
setCloseEvent(WebEvent event)
set the close event for the editorvoid
setCloseJS(java.lang.String value)
Specifies JavaScript function to be invoked when closing Editor in DHTML mode only.void
setCloseLabel(java.lang.String closeLabel)
set the close label, which is displayed as the tooltip of the close iconvoid
setContents(MarkupOutput out)
Deprecated.Don't create a MarkupOutput and create it, instead callgetContents
and populate this instance.void
setContentsCss(java.lang.String css)
set the content css class name for the editorvoid
setCssPrefix(java.lang.String value)
Set the cssPrefix for the editor containervoid
setDisplayFlags(int flags)
set the display flag for the editorvoid
setEditorDefinitionLayout(java.lang.String fileName)
Sets the definition layout for the editor.void
setExtraProperties(MarkupOutput mo)
Deprecated.replaced bysetAttribute(String, String, int)
void
setForm(java.lang.String action, java.lang.String method, java.lang.String formName)
set the form information for the editorvoid
setForm(java.lang.String action, java.lang.String method, java.lang.String formName, java.lang.String extraAttributes)
set the form information for the editorvoid
setForm(java.lang.String action, java.lang.String method, java.lang.String formName, java.lang.String extraAttributes, java.lang.String onSubmitInfo)
set the form information for the editorvoid
setFormId(java.lang.String value)
Set the if of the form to use in XHR partial updatevoid
setGlobalContentCss(java.lang.String css)
set the global content css class name for the editorvoid
setGlobalCss(java.lang.String css)
set the global css class name for the editorvoid
setHelpEvent(WebEvent event)
Deprecated.void
setHelpLabel(java.lang.String helpLabel)
set the help label, which is displayed as the tooltip of the help iconvoid
setHelpToolTip(java.lang.String title)
set the tooltip of the editorvoid
setHelpTopic(java.lang.String topic)
set the help topic of the editorvoid
setHelpType(java.lang.String type)
set the help type for the editorvoid
setHideFocus(boolean value)
set the hide focus property of the buttons in the editorvoid
setImageBasePath(java.lang.String path)
Set the folder path to be used as base for all the images to use while displaying menusvoid
setOkEvent(WebEvent event)
set the ok event for the editorvoid
setOkJS(java.lang.String value)
Specifies JavaScript function to be invoked when pressing Editor's 'OK' button in DHTML mode only.void
setOKLabel(java.lang.String OKLabel)
set the ok label, which is displayed as the text of the ok buttonvoid
setOKTooltip(java.lang.String OKLabel)
set the ok tooltip, which is displayed as the text of the ok buttonvoid
setPostButtonContents(MarkupOutput out)
set the content after the apply/ok/cancel buttonsvoid
setSpaceAfterEditor(boolean spaceAfterEditor)
Set whethere display a blank space underneath the editorvoid
setTitle(java.lang.String title)
set the title of the editorvoid
setTitleCss(java.lang.String css)
set the title css class name for the editorvoid
setTitleElements(MarkupOutput out)
set the title elements of the editorvoid
setTitleElementsCss(java.lang.String css)
set the title elements' css class name for the editorvoid
setUseDHTMLForEditorClose(boolean value)
Set to true if we want to use DHTML code to close the editor-
Methods inherited from interface com.microstrategy.web.app.gui.GuiElement
getAppContext, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getFeatures, getMessages, getName, getUseIFrame, getWebComponent, renderElement, renderElement, setAppContext, setExtraInput, setExtraUrl, setName, setUseIFrame, setWebComponent
-
-
-
-
Field Detail
-
APPLY_BUTTON
static final int APPLY_BUTTON
The property value of the Apply button- Since:
- MicroStrategy Web 8.0.1
- See Also:
- Constant Field Values
-
OK_BUTTON
static final int OK_BUTTON
The property value of the OK button- Since:
- MicroStrategy Web 8.0.1
- See Also:
- Constant Field Values
-
CANCEL_BUTTON
static final int CANCEL_BUTTON
The property value of the Cancel button- Since:
- MicroStrategy Web 8.0.1
- See Also:
- Constant Field Values
-
-
Method Detail
-
setTitle
void setTitle(java.lang.String title)
set the title of the editor- Parameters:
title
- the title of the editor
-
getTitle
java.lang.String getTitle()
get the title of the editor- Returns:
- the title of the editor
-
setActionButtonsBar
void setActionButtonsBar(Tag ab)
Sets the TR tag that will be used to render the action buttons bar- Since:
- MicroStrategy Web 9.0.0
-
getActionButtonsBar
Tag getActionButtonsBar()
Returns the TR tag that will be used to render the action buttons bar- Since:
- MicroStrategy Web 9.0.0
-
setHideFocus
void setHideFocus(boolean value)
set the hide focus property of the buttons in the editor- Parameters:
value
- the value of the hide focus property- Since:
- MicroStrategy Web 8.1.0
-
isHideFocus
boolean isHideFocus()
gets the hide focus property of the buttons in the editor- Returns:
- the value of the hide focus property
- Since:
- MicroStrategy Web 8.1.0
-
setHelpToolTip
void setHelpToolTip(java.lang.String title)
set the tooltip of the editor- Parameters:
title
- the tooltip of the editor- Since:
- MicroStrategy Web 8.0.0
-
getHelpToolTip
java.lang.String getHelpToolTip()
get the tooltip of the editor- Returns:
- the tooltip of the editor
- Since:
- MicroStrategy Web 8.0.0
-
setDisplayFlags
void setDisplayFlags(int flags)
set the display flag for the editor- Parameters:
flags
- the display flag
-
getDisplayFlags
int getDisplayFlags()
get the display flag for the editor- Returns:
- the display flag
-
appendDisplayFlag
void appendDisplayFlag(int flag)
append some display flag- Parameters:
flag
- the flag to append
-
setHelpEvent
@Deprecated void setHelpEvent(WebEvent event)
Deprecated.set the help event for the editor- Parameters:
event
- the help event
-
setHelpType
void setHelpType(java.lang.String type)
set the help type for the editor- Parameters:
type
- String is one ofHelpHelper.HELP_TYPE_ADMIN
,HelpHelper.HELP_TYPE_USER
,HelpHelper.HELP_TYPE_CUSTOM
- Since:
- MicroStrategy Web 9.0.0
-
getHelpEvent
@Deprecated WebEvent getHelpEvent()
Deprecated.usegetHelpType()
get the help event for the editor- Returns:
- the help event
-
getHelpType
java.lang.String getHelpType()
get the type of the help file- Returns:
- the type is one of
HelpHelper.HELP_TYPE_ADMIN
,HelpHelper.HELP_TYPE_USER
,HelpHelper.HELP_TYPE_CUSTOM
- Since:
- MicroStrategy Web 9.0.0
-
setHelpTopic
void setHelpTopic(java.lang.String topic)
set the help topic of the editor- Parameters:
topic
- the help topic
-
setCloseEvent
void setCloseEvent(WebEvent event)
set the close event for the editor- Parameters:
event
- the close event
-
getCloseEvent
WebEvent getCloseEvent()
get the close event for the editor- Returns:
- the close event
-
setApplyEvent
void setApplyEvent(WebEvent event)
set the apply event for the editor- Parameters:
event
- the apply event
-
getApplyEvent
WebEvent getApplyEvent()
get the apply event for the editor- Returns:
- the apply event
-
setOkEvent
void setOkEvent(WebEvent event)
set the ok event for the editor- Parameters:
event
- the ook event
-
getOkEvent
WebEvent getOkEvent()
get the ok event for the editor- Returns:
- the ok event
-
setCancelEvent
void setCancelEvent(WebEvent event)
set the cancel event for the editor- Parameters:
event
- the cancel event
-
getCancelEvent
WebEvent getCancelEvent()
get the cancel event for the editor- Returns:
- the cancel event
-
setHelpLabel
void setHelpLabel(java.lang.String helpLabel)
set the help label, which is displayed as the tooltip of the help icon- Parameters:
helpLabel
- the help label
-
setCloseLabel
void setCloseLabel(java.lang.String closeLabel)
set the close label, which is displayed as the tooltip of the close icon- Parameters:
closeLabel
- the close label
-
setApplyLabel
void setApplyLabel(java.lang.String applyLabel)
set the apply label, which is displayed as the text of the apply button- Parameters:
applyLabel
- the apply label
-
setOKLabel
void setOKLabel(java.lang.String OKLabel)
set the ok label, which is displayed as the text of the ok button- Parameters:
OKLabel
- the ok label
-
setCancelLabel
void setCancelLabel(java.lang.String cancelLabel)
set the cancel label, which is displayed as the text of the cancel button- Parameters:
cancelLabel
- the cancel label
-
setApplyTooltip
void setApplyTooltip(java.lang.String applyTooltip)
set the apply tooltip, which is displayed as the text of the apply button- Parameters:
applyTooltip
- the apply tooltip- Since:
- MicroStrategy Web 8.1.0
-
setOKTooltip
void setOKTooltip(java.lang.String OKLabel)
set the ok tooltip, which is displayed as the text of the ok button- Parameters:
OKLabel
- the ok label- Since:
- MicroStrategy Web 8.1.0
-
setCancelTooltip
void setCancelTooltip(java.lang.String cancelLabel)
set the cancel tooltip, which is displayed as the text of the cancel button- Parameters:
cancelLabel
- the cancel label- Since:
- MicroStrategy Web 8.1.0
-
setButtonDisabled
void setButtonDisabled(int button, boolean disableValue)
Set the disabled property of the specified button. The button which needs to be disabled is one ofAPPLY_BUTTON
,OK_BUTTON
orCANCEL_BUTTON
- Parameters:
button
- The actual button whose disabled property needs to be changed.disableValue
- boolean value set to true to disable the apply button.- Since:
- MicroStrategy Web 8.0.1
-
setForm
void setForm(java.lang.String action, java.lang.String method, java.lang.String formName)
set the form information for the editor- Parameters:
action
- the action attribute of the formmethod
- the method attribute of the formformName
- the name attribute of the form
-
setForm
void setForm(java.lang.String action, java.lang.String method, java.lang.String formName, java.lang.String extraAttributes)
set the form information for the editor- Parameters:
action
- the action attribute of the formmethod
- the method attribute of the formformName
- the name attribute of the formextraAttributes
- extra attributes in the form definition
-
setForm
void setForm(java.lang.String action, java.lang.String method, java.lang.String formName, java.lang.String extraAttributes, java.lang.String onSubmitInfo)
set the form information for the editor- Parameters:
action
- the action attribute of the formmethod
- the method attribute of the formformName
- the name attribute of the formextraAttributes
- extra attributes in the form definitiononSubmitInfo
- the onSubmit attribute of the form
-
setContents
@Deprecated void setContents(MarkupOutput out)
Deprecated.Don't create a MarkupOutput and create it, instead callgetContents
and populate this instance.Registers the content of the editor. This is the body section. Users can provide their own populated MarkupOutput which will be appended to the editor's output in the body section.
Is not recommeneded to use this method (in fact, it has been deprecated). Users should instead call thegetContents
method which returns aMarkupOutput
and populate this object.- Parameters:
out
- the content as aMarkupOutput
object
-
getContents
MarkupOutput getContents()
Returns the content of the editor. This is the MarkupOutput clients users should manipulate to generate the body of the editor.- Returns:
- the content as a
MarkupOutput
object used for the body section
-
setPostButtonContents
void setPostButtonContents(MarkupOutput out)
set the content after the apply/ok/cancel buttons- Parameters:
out
- the content as aMarkupOutput
object
-
getPostButtonContents
MarkupOutput getPostButtonContents()
get the content after the apply/ok/cancel buttons- Returns:
- the content as a
MarkupOutput
object
-
setTitleElements
void setTitleElements(MarkupOutput out)
set the title elements of the editor- Parameters:
out
- the title elements as aMarkupOutput
object
-
getTitleElements
MarkupOutput getTitleElements()
get the title elements of the editor- Returns:
- the title elements as a
MarkupOutput
object
-
setGlobalCss
void setGlobalCss(java.lang.String css)
set the global css class name for the editor- Parameters:
css
- the css class name
-
setGlobalContentCss
void setGlobalContentCss(java.lang.String css)
set the global content css class name for the editor- Parameters:
css
- the css class name
-
setContentsCss
void setContentsCss(java.lang.String css)
set the content css class name for the editor- Parameters:
css
- the css class name
-
setButtonsCss
void setButtonsCss(java.lang.String css)
set the button css class name for the editor- Parameters:
css
- the css class name
-
setTitleCss
void setTitleCss(java.lang.String css)
set the title css class name for the editor- Parameters:
css
- the css class name
-
setTitleElementsCss
void setTitleElementsCss(java.lang.String css)
set the title elements' css class name for the editor- Parameters:
css
- the css class name
-
setImageBasePath
void setImageBasePath(java.lang.String path)
Set the folder path to be used as base for all the images to use while displaying menus- Parameters:
path
- the folder path
-
setExtraProperties
@Deprecated void setExtraProperties(MarkupOutput mo)
Deprecated.replaced bysetAttribute(String, String, int)
Set extra information to the whole editor. We use it for setting the drag and drop properties.- Parameters:
mo
- the MarkupOutput object
-
setAttribute
void setAttribute(java.lang.String attributeName, java.lang.String value, int location)
Set attributes on the location specified (EnumEditorSectionTypes.EditorMainDiv, EnumEditorSectionTypes.EditorTitleDiv, EnumEditorSectionTypes.EditorBodyDiv). We use it for setting the bone properties.- Parameters:
attributeName
- the name of the attribute to be setvalue
- the value to be set for the named attributelocation
- the location to add the attribute asEnumEditorSectionTypes
- Since:
- MicroStrategy Web 8.0.0
-
setUseDHTMLForEditorClose
void setUseDHTMLForEditorClose(boolean value)
Set to true if we want to use DHTML code to close the editor- Parameters:
value
- The boolean value set to true if we want to use DHTML code to close the editor
-
getUseDHTMLForEditorClose
boolean getUseDHTMLForEditorClose()
Returns true if we want to use DHTML code to close the editor- Returns:
- true if we want to use DHTML code to close the editor
-
hasSpaceAfterEditor
boolean hasSpaceAfterEditor()
whethere display a blank space underneath the editor- Returns:
- whethere display a blank space underneath the editor
-
setSpaceAfterEditor
void setSpaceAfterEditor(boolean spaceAfterEditor)
Set whethere display a blank space underneath the editor- Parameters:
spaceAfterEditor
- whethere display a blank space underneath the editor
-
setEditorDefinitionLayout
void setEditorDefinitionLayout(java.lang.String fileName)
Sets the definition layout for the editor. The definition layout indicates what section of the editor to display i.e. the buttons to include in the footer.- Parameters:
fileName
- the definition of the editor- Since:
- MicroStrategy Web 8.0.0
-
setApplyJS
void setApplyJS(java.lang.String value)
Specifies JavaScript function to be invoked when applying changes for Editor in DHTML mode only.- Parameters:
value
- String Array consisted of function name and parameters.- Since:
- MicroStrategy Web 8.0.0
-
setOkJS
void setOkJS(java.lang.String value)
Specifies JavaScript function to be invoked when pressing Editor's 'OK' button in DHTML mode only.- Parameters:
value
- String Array consisted of function name and parameters.- Since:
- MicroStrategy Web 8.0.0
-
setCancelJS
void setCancelJS(java.lang.String value)
Specifies JavaScript function to be invoked when canceling Editor in DHTML mode only.- Parameters:
value
- String Array consisted of function name and parameters.- Since:
- MicroStrategy Web 8.0.0
-
setCloseJS
void setCloseJS(java.lang.String value)
Specifies JavaScript function to be invoked when closing Editor in DHTML mode only.- Parameters:
value
- String Array consisted of function name and parameters.- Since:
- MicroStrategy Web 8.0.0
-
getApplyJS
java.lang.String getApplyJS()
Indicates JavaScript to be executed when applying changes current Editor.- Returns:
- String JS function
- Since:
- MicroStrategy Web 8.0.0
-
getOkJS
java.lang.String getOkJS()
Indicates JavaScript to be executed when clicking 'OK' button in current Editor.- Returns:
- String JS function
- Since:
- MicroStrategy Web 8.0.0
-
getCancelJS
java.lang.String getCancelJS()
Indicates JavaScript to be executed when canceling current Editor.- Returns:
- String JS function
- Since:
- MicroStrategy Web 8.0.0
-
getCloseJS
java.lang.String getCloseJS()
Indicates JavaScript to be executed when closing current Editor.- Returns:
- String JS function
- Since:
- MicroStrategy Web 8.0.0
-
setCanAutoSize
void setCanAutoSize(boolean value)
Set to true if the editor can auto size to show its contents- Parameters:
value
- The boolean value set to true if if the editor can auto size to show its contents- Since:
- MicroStrategy Web 8.0.0
-
getCanAutoSize
boolean getCanAutoSize()
Returns true if the editor can auto size to show its contents- Returns:
- true if the editor can auto size to show its contents
- Since:
- MicroStrategy Web 8.0.0
-
setCssPrefix
void setCssPrefix(java.lang.String value)
Set the cssPrefix for the editor container- Parameters:
value
- The String that is to be used for the cssPrefix for the editor container- Since:
- MicroStrategy Web 8.0.0
-
renderHelpButton
void renderHelpButton(MarkupOutput out)
Renders the help button for an editor.- Parameters:
out
- MarkupOutput where the help will be generated- Since:
- MicroStrategy Web 9.0.0
-
renderHelpButton
@Deprecated void renderHelpButton(MarkupOutput out, WebEvent helpEvent, java.lang.String helpTopic)
Deprecated.Renders the help button for an editor.- Parameters:
out
- MarkupOutput where the help will be generatedhelpEvent
- WebEvent the help event to usehelpTopic
- String the associated help topic with this editor.- Since:
- MicroStrategy Web 8.0.0
-
renderCloseButton
void renderCloseButton(MarkupOutput out, WebEvent closeEvent, java.lang.String closeJS)
Renders the close button for an editor- Parameters:
out
- MarkupOutput where the button will be generatedcloseEvent
- WebEvent the event to use to close the editorcloseJS
- an optional String, if not empty it would be used as the value of the onclick if DHTML is enabled.- Since:
- MicroStrategy Web 8.0.0
-
setFormId
void setFormId(java.lang.String value)
Set the if of the form to use in XHR partial update- Parameters:
value
- String the value+"_form" forms the actual id of the form that should be submitted- Since:
- MicroStrategy Web 9.0.1
-
renderElement
MarkupOutput renderElement(java.lang.String cssClass)
render the gui element in a MarkupOutput object- Parameters:
cssClass
- the css class of target object- Returns:
- the
MarkupOutput
object
-
-