|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.aims.mtier.model.map.Legend
public class Legend
Represents the legend associated with a Map object.
Constructor Summary | |
---|---|
Legend()
Constructs a new Legend object specific to the Map objects service. |
Method Summary | |
---|---|
void |
clearHiddenLayers()
Clears all Layer objects from the hidden layers collection. |
String |
getBackground()
Returns the legends background color. |
int |
getCellSpacing()
Returns the cellspacing value for the legend. |
int |
getColumns()
Returns the number of legend display columns. |
String |
getFont()
Returns the font associated with this Legend. |
long |
getHeight()
Returns the legend's height in pixels. |
Object |
getHiddenLayer(int index)
Returns the Layer at the given index from the hidden layers collection. |
int |
getHiddenLayersCount()
Returns a count of all Layers in the hidden layers collection. |
int |
getLayerFontSize()
Returns the layer's fontsize value. |
LegendOutput |
getLegendOutput()
Returns the output object associated with the legend. |
String |
getSplitText()
Returns the splitText value. |
byte[] |
getStream()
Returns the raw bytes associated with this Legend image. |
String |
getStreamType()
Returns the Legend's raw bytes image type. |
int |
getSwatchHeight()
Returns the swatch height value for the legend. |
int |
getSwatchWidth()
Returns the swatch width value for the legend. |
String |
getTitle()
Returns the title value for this legend. |
int |
getTitleFontSize()
Returns the title font size associated with this legend. |
String |
getTransColor()
Returns the transparency color value for the legend. |
int |
getValueFontSize()
Returns the layer value's font size. |
long |
getWidth()
Returns the legend's width in pixels. |
void |
hideLayer(Object layerObject)
Adds the given Layer to the hidden layers collection. |
boolean |
isAntialiasing()
Returns 'True' if antialiasing is set. |
boolean |
isAutoExtend()
Returns 'True' if the autoextend property is set to true. |
boolean |
isCanSplit()
Returns 'True' if canSplit was set. |
boolean |
isDisplay()
Returns 'True' if Display property is set. |
boolean |
isDrawMap()
Returns 'True', if the DrawMap method was set. |
boolean |
isReverseOrder()
Returns "True" if the reverseorder property is set. |
void |
removeHiddenLayer(int index)
Removes a layer object from the hidden layers collection by index. |
void |
setAntialiasing(boolean value)
Sets antialiasing on the legend. |
void |
setAutoExtend(boolean value)
Sets the auto extend value for the legend. |
void |
setBackground(String value)
Sets the specified color as background color for the legend. |
void |
setCanSplit(boolean value)
If set to 'True', splits the legend entities into multiple columns. |
void |
setCellSpacing(int value)
Sets the cell spacing value for the legend with given value. |
void |
setColumns(int value)
Sets the number of columns to display the legend entities in. |
void |
setDisplay(boolean value)
Sets the Display property of the legend. |
void |
setDrawMap(boolean value)
When set to 'False', this method disables Map generation and displays only the Legend when the Map object's refresh method is called. |
void |
setFont(String value)
Sets the legend's font. |
void |
setHeight(long value)
Sets the legend's height in pixels. |
void |
setLayerFontSize(int value)
Sets the layer's font size value for the legend. |
void |
setReverseOrder(boolean value)
Sets the reverseOrder value to "True", so that the legend entities are displayed in reverse order. |
void |
setSplitText(String value)
Splits text that displays in the bottom of a column, if a ValueMapRenderer
is carried over into the next column. |
void |
setStream(byte[] stream)
set legend image raw bytes |
void |
setStreamType(String type)
Sets the Legend's raw bytes image type using given string. |
void |
setSwatchHeight(int value)
Sets the swatch height value for the legend. |
void |
setSwatchWidth(int value)
Sets the given value as swatch width for the legend. |
void |
setTitle(String value)
Sets the title for the legend. |
void |
setTitleFontSize(int value)
Sets the title font size for this legend. |
void |
setTransColor(String value)
Sets the transparency color for the legend. |
void |
setValueFontSize(int value)
Sets the value's fontsize. |
void |
setWidth(long value)
Sets the width in pixels for this legend. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Legend()
Legend legend = new Legend();
Method Detail |
---|
public void setColumns(int value)
legend.setColumns(1);
value
- the number of columns.getColumns()
public int getColumns()
int columns = legend.getColumns();
setColumns(int)
public void setReverseOrder(boolean value)
legend.setReverseOrder(false);
value
- boolean value - set to "True" to display in reverse order.isReverseOrder()
public boolean isReverseOrder()
reverseorder
property is set.
Example: if(legend.isReverseOrder() == true){ legend.setReverseOrder(false); }
setReverseOrder(boolean)
public void setTransColor(String value)
legend.setTransColor("255,0,0");
value
- the transparency color.getTransColor()
public String getTransColor()
String transcolor = legend.getTransColor();
setTransColor(java.lang.String)
public void setSwatchWidth(int value)
legend.setSwatchWidth(10);
value
- the swatch width value.getSwatchWidth()
public int getSwatchWidth()
int width = legend.getSwatchWidth();
setSwatchWidth(int)
public void setStream(byte[] stream)
public byte[] getStream()
public void setStreamType(String type)
public String getStreamType()
public void setSwatchHeight(int value)
legend.setSwatchHeight(20);
value
- the swatch height value.getSwatchHeight()
public int getSwatchHeight()
int height = legend.getSwatchHeight();
setSwatchHeight(int)
public void setAutoExtend(boolean value)
legend.setAutoExtend(true);
value
- a boolean variable - True or false.isAutoExtend()
public boolean isAutoExtend()
autoextend
property is set to true. Example:
if(legend.isAutoExtend() == true){ legend.setAutoExtend(false); }
setAutoExtend(boolean)
public void setBackground(String value)
legend.setBackground("255,0,0");
value
- the background color.getBackground()
public String getBackground()
String backColor = legend.getBackground();
setBackground(java.lang.String)
public LegendOutput getLegendOutput()
String legurl = legend.getLegendOutput().getURL();
public void setCellSpacing(int value)
legend.setCellSpacing(10);
value
- the cellSpacing value.getCellSpacing()
public int getCellSpacing()
int spacing = legend.getCellSpacing();
setCellSpacing(int)
public void setTitleFontSize(int value)
legend.setTitleFontSize(10);
value
- the fontsize value.getTitleFontSize()
public int getTitleFontSize()
int tfsize = legend.getTitleFontSize();
setTitleFontSize(int)
public void setLayerFontSize(int value)
legend.setLayerFontSize(10);
value
- the fontsize value.getLayerFontSize()
public int getLayerFontSize()
int lfsize = legend.getLayerFontSize();
setLayerFontSize(int)
public void setValueFontSize(int value)
legend.setValueFontSize(10);
value
- the fontsize value.getValueFontSize()
public int getValueFontSize()
int vfsize = legend.getValueFontSize();
setValueFontSize(int)
public void setTitle(String value)
legend.setTitle("My Legend");
value
- the title value.getTitle()
public String getTitle()
String title = legend.getTitle();
setTitle(java.lang.String)
public void setWidth(long value)
legend.setWidth(300);
value
- the pixel width value.getWidth()
public long getWidth()
long width = legend.getWidth();
setWidth(long)
public void setHeight(long value)
legend.setHeight(400);
value
- the pixel height value.getHeight()
public long getHeight()
long height = legend.getHeight();
setHeight(long)
public void setAntialiasing(boolean value)
legend.setAntialiasing(true);
value
- the antialiasing value.isAntialiasing()
public boolean isAntialiasing()
if(legend.isAntialiasing() == true){ legend.setAntialiasing(false); }
setAntialiasing(boolean)
public void setCanSplit(boolean value)
legend.setCanSplit(true);
value
- the cansplit value.isCanSplit()
public boolean isCanSplit()
canSplit
was set. Example:
if(legend.isCanSplit() == true){ legend.setCanSplit(false); }
setCanSplit(boolean)
public void setDisplay(boolean value)
Display
property of the legend. If set to 'False', legend image file
will not be generated. Example:
legend.setDisplay(true);
value
- the display value.isDisplay()
public boolean isDisplay()
Display
property is set. Example:
if(legend.isDisplay() == true){ legend.setDisplay(false); }
setDisplay(boolean)
public void setFont(String value)
legend.setFont("verdana");
value
- the font value.getFont()
public String getFont()
String font = legend.getFont();
setFont(java.lang.String)
public void setSplitText(String value)
ValueMapRenderer
is carried over into the next column. Example:
legend.setSplitText("Alabama");
value
- the text to split.getSplitText()
public String getSplitText()
splitText
value. Example:
String splitText = legend.getSplitText();
splitText
as stringsetSplitText(java.lang.String)
public void setDrawMap(boolean value)
refresh
method is called. Example:
map.setDrawMap(true);
value
- a boolean value - True/False.isDrawMap()
public boolean isDrawMap()
DrawMap
method was set. Example:
if(map.isDrawMap() == true){ map.setDrawMap(false); }
setDrawMap(boolean)
public void hideLayer(Object layerObject)
map.hideLayer(featureLayer);
layerObject
- the layer object to be hidden. This layer can
include FeatureLayer, ImageLayer, and AcetateLayer.getHiddenLayer(int)
,
removeHiddenLayer(int)
,
clearHiddenLayers()
,
getHiddenLayersCount()
public Object getHiddenLayer(int index)
FeatureLayer fl = (FeatureLayer)legend.getHiddenLayer(0);
index
- the index of the Layer to be removed.
hideLayer(java.lang.Object)
,
removeHiddenLayer(int)
,
clearHiddenLayers()
,
getHiddenLayersCount()
public void removeHiddenLayer(int index)
legend.removeHiddenLayer(0);
index
- the index of the Layer to be removed.hideLayer(java.lang.Object)
,
getHiddenLayer(int)
,
clearHiddenLayers()
,
getHiddenLayersCount()
public void clearHiddenLayers()
legend.clearHiddenLayers();
hideLayer(java.lang.Object)
,
getHiddenLayer(int)
,
getHiddenLayersCount()
,
removeHiddenLayer(int)
public int getHiddenLayersCount()
int count = legend.getHiddenLayersCount();
hideLayer(java.lang.Object)
,
getHiddenLayer(int)
,
removeHiddenLayer(int)
,
clearHiddenLayers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |