|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.weblab.portlet.tool.MediaUnitLegend
public class MediaUnitLegend
Class representing an editable Media Unit legend and get it HTML representation. The legend contains a set of fields. For each field, corresponding a color and a name. Legend can be modified with HTML browser using a colorpicker. modification on legend can be retrieved, using a HTML form.
| Field Summary | |
|---|---|
static java.lang.String |
LEGEND_CHECKBOX_COLOR
|
static java.lang.String |
LEGEND_CHECKBOX_INPUT
|
static java.lang.String |
LEGEND_COLOR_INPUT
|
static java.lang.String |
SAVE_LEGEND_SUBMIT
|
| Constructor Summary | |
|---|---|
MediaUnitLegend()
Public constructor without parameters. |
|
MediaUnitLegend(java.util.List<LegendField> fields,
java.lang.String appContext,
java.lang.String styleContext)
Public constructor taking in parameters |
|
| Method Summary | |
|---|---|
java.lang.String |
getActionURL()
|
java.lang.String |
getAppContext()
Getters and setters |
java.lang.String |
getCheckBoxInputName(LegendField field)
To get the checkbox value of the field in the HTML form. |
java.util.Map<java.lang.String,java.lang.Boolean> |
getCheckedMap()
|
java.lang.String |
getColor(NamedEntity ne)
Method to get the color of a typed valued entity in the legend. |
java.lang.String |
getColorInputName(LegendField field)
To get the color of the field in the HTML form. |
java.util.Map<java.lang.String,java.lang.String> |
getColorMap()
|
java.lang.String |
getDisplayName(NamedEntity ne,
java.util.ResourceBundle resourceBundle)
to get the display class name for the entity |
java.util.List<LegendField> |
getFields()
|
java.lang.String |
getHTMLLegend(boolean editable,
java.util.ResourceBundle resourceBundle)
Method used to get a HTML representation of the legend, where colors are editable or not throw a JavaScript color picker . |
java.util.Set<java.lang.String> |
getMachedValuesOnPredicat(java.lang.String predicat)
Get values corresponding a predicate in the legend. |
java.util.Set<java.lang.String> |
getPredicats()
|
java.lang.String |
getStyle(NamedEntity ne)
Method to get the css style name of an named entity. |
java.lang.String |
getStyleContext()
|
java.util.Map<java.lang.String,java.lang.String> |
getStyleMap()
|
void |
setActionURL(java.lang.String actionURL)
|
void |
setAppContext(java.lang.String appContext)
|
void |
setCheckedMap(java.util.Map<java.lang.String,java.lang.Boolean> checkedMap)
|
void |
setColorMap(java.util.Map<java.lang.String,java.lang.String> colorMap)
|
void |
setFields(java.util.List<LegendField> fields)
|
void |
setStyleContext(java.lang.String styleContext)
|
void |
setStyleMap(java.util.Map<java.lang.String,java.lang.String> styleMap)
|
boolean |
show(NamedEntity ne)
Method to get visibility of the named entity. |
void |
updateShemColor()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String SAVE_LEGEND_SUBMIT
public static java.lang.String LEGEND_COLOR_INPUT
public static java.lang.String LEGEND_CHECKBOX_INPUT
public static java.lang.String LEGEND_CHECKBOX_COLOR
| Constructor Detail |
|---|
public MediaUnitLegend()
public MediaUnitLegend(java.util.List<LegendField> fields,
java.lang.String appContext,
java.lang.String styleContext)
fields - the list of fields of the legendappContext - the application context usedstyleContext - the HTML element class root name| Method Detail |
|---|
public java.lang.String getHTMLLegend(boolean editable,
java.util.ResourceBundle resourceBundle)
editable - boolean allowing color edition
public java.lang.String getColor(NamedEntity ne)
entityType - entity type (For example
"http://weblab.eads.com/property/gate/annotation")matchedValue - (For example "Person")
public java.lang.String getStyle(NamedEntity ne)
ne - the named entity
public boolean show(NamedEntity ne)
ne - the named entity
public java.util.Set<java.lang.String> getPredicats()
public java.util.Set<java.lang.String> getMachedValuesOnPredicat(java.lang.String predicat)
predicat - the predicate.
public java.lang.String getColorInputName(LegendField field)
field -
public java.lang.String getCheckBoxInputName(LegendField field)
field -
public java.lang.String getDisplayName(NamedEntity ne,
java.util.ResourceBundle resourceBundle)
public java.lang.String getAppContext()
public void setAppContext(java.lang.String appContext)
public java.lang.String getStyleContext()
public void setStyleContext(java.lang.String styleContext)
public java.util.List<LegendField> getFields()
public void setFields(java.util.List<LegendField> fields)
public java.lang.String getActionURL()
public void setActionURL(java.lang.String actionURL)
public void updateShemColor()
public java.util.Map<java.lang.String,java.lang.String> getColorMap()
public void setColorMap(java.util.Map<java.lang.String,java.lang.String> colorMap)
public java.util.Map<java.lang.String,java.lang.String> getStyleMap()
public void setStyleMap(java.util.Map<java.lang.String,java.lang.String> styleMap)
public java.util.Map<java.lang.String,java.lang.Boolean> getCheckedMap()
public void setCheckedMap(java.util.Map<java.lang.String,java.lang.Boolean> checkedMap)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||