abstract class AbstractColorFeatureBehavior extends AbstractClickFeatureBehavior
AbstractClickFeatureBehavior
for a selection feature
that is
offered as a combobox.Modifier and Type | Field and Description |
---|---|
private ColorBox |
colorBox |
private LabelWidget |
fontSettingsLabel |
private com.google.gwt.user.client.ui.Widget |
fontSettingsWidget |
Constructor and Description |
---|
AbstractColorFeatureBehavior(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(Color value,
com.google.gwt.dom.client.Style style) |
void |
applyFontSettings(com.google.gwt.dom.client.Style style) |
protected ColorBox |
getColorBox() |
LabelWidget |
getFontSettingsLabel() |
com.google.gwt.user.client.ui.Widget |
getFontSettingsWidget() |
protected abstract String |
getValue() |
protected boolean |
hasFontSettingsWidget() |
protected Color |
parseColor(String colorString)
|
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.Widget fontSettingsWidget
getFontSettingsWidget()
private ColorBox colorBox
getFontSettingsWidget()
public AbstractColorFeatureBehavior(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 ColorBox getColorBox()
public void updateFontSettings()
RichTextArea
.updateFontSettings
in interface FeatureBehavior
updateFontSettings
in class AbstractFeatureBehavior
protected abstract String getValue()
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.Copyright © 2001–2014 mmm-Team. All rights reserved.