abstract class AbstractSelectionFeatureBehavior extends AbstractClickFeatureBehavior
AbstractClickFeatureBehavior
for a selection feature
that is
offered as a combobox.Modifier and Type | Field and Description |
---|---|
private ComboBox |
combobox |
private DataList |
dataList
The
DataList with the options. |
private LabelWidget |
fontSettingsLabel |
private com.google.gwt.user.client.ui.FlowPanel |
fontSettingsWidget |
Constructor and Description |
---|
AbstractSelectionFeatureBehavior(RichTextToolbar richTextToolbar)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
applyFontSettings()
Updates the
RichTextArea according to the value from the widget for
the font-settings. |
protected abstract void |
applyFontSettings(String value,
com.google.gwt.dom.client.Style style) |
void |
applyFontSettings(com.google.gwt.dom.client.Style style) |
protected abstract List<String> |
createOptions() |
protected ComboBox |
getCombobox() |
protected DataList |
getDataList() |
LabelWidget |
getFontSettingsLabel() |
com.google.gwt.user.client.ui.Widget |
getFontSettingsWidget() |
protected abstract String |
getValue() |
protected boolean |
hasFontSettingsWidget() |
void |
setFontSettingsPreviewElement(com.google.gwt.dom.client.Element element)
Updates the
RichTextArea according to the value from the widget for
the font-settings. |
void |
updateFontSettings()
Updates the value of the widget for the font-settings according to the state of the
RichTextArea . |
getToolbarWidget, isEnabled, setEnabled
createFontSettingsLabel, createId, getFormatter, getIconMarkup, getLocalizedLabel, getRichTextToolbar, isVisible, setVisible, updateToolbar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFeature
private LabelWidget fontSettingsLabel
getFontSettingsLabel()
private com.google.gwt.user.client.ui.FlowPanel fontSettingsWidget
getFontSettingsWidget()
private ComboBox combobox
getFontSettingsWidget()
public AbstractSelectionFeatureBehavior(RichTextToolbar richTextToolbar)
richTextToolbar
- is the RichTextToolbar
owning this FeatureBehavior
.public abstract void applyFontSettings()
RichTextArea
according to the value from the widget for
the font-settings.applyFontSettings
in interface FeatureBehavior
applyFontSettings
in class AbstractFeatureBehavior
public com.google.gwt.user.client.ui.Widget getFontSettingsWidget()
getFontSettingsWidget
in interface FeatureBehavior
getFontSettingsWidget
in class AbstractFeatureBehavior
Widget
for the feature
in the
RichTextToolbar.FontSettingsPopup
.protected boolean hasFontSettingsWidget()
hasFontSettingsWidget
in class AbstractFeatureBehavior
true
if the font settings widget
is available and
has already been created, false
otherwise.public LabelWidget getFontSettingsLabel()
getFontSettingsLabel
in interface FeatureBehavior
getFontSettingsLabel
in class AbstractFeatureBehavior
LabelWidget
for the feature
in the
RichTextToolbar.FontSettingsPopup
or
null
if not intended (e.g. toggle features
use
a CheckBox
as popup widget
and do not have a separate label).protected DataList getDataList()
DataList
for the popup widget
combo.protected ComboBox getCombobox()
public void setFontSettingsPreviewElement(com.google.gwt.dom.client.Element element)
RichTextArea
according to the value from the widget for
the font-settings.setFontSettingsPreviewElement
in interface FeatureBehavior
setFontSettingsPreviewElement
in class AbstractFeatureBehavior
element
- is the Element
where to apply font settings whenever the value changed.public void applyFontSettings(com.google.gwt.dom.client.Style style)
style
- the Style
to modify.protected abstract void applyFontSettings(String value, com.google.gwt.dom.client.Style style)
value
- the value to set (e.g. font family).style
- the Style
to modify.public void updateFontSettings()
RichTextArea
.updateFontSettings
in interface FeatureBehavior
updateFontSettings
in class AbstractFeatureBehavior
protected abstract String getValue()
Copyright © 2001–2016 mmm-Team. All rights reserved.