Package org.meteoinfo.layout
Class LayoutLegend
- java.lang.Object
-
- org.meteoinfo.layout.LayoutElement
-
- org.meteoinfo.layout.LayoutLegend
-
public class LayoutLegend extends LayoutElement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLayoutLegend.LayerNameEditorstatic classLayoutLegend.LayerUpdateTypeEditorclassLayoutLegend.LayoutLegendBeanstatic classLayoutLegend.LayoutLegendBeanBeanInfostatic classLayoutLegend.LegendStyleEditor
-
Constructor Summary
Constructors Constructor Description LayoutLegend(MapLayout mapLayout, LayoutMap layoutMap)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()Get column numberjava.awt.FontgetFont()Get fontjava.lang.StringgetLayerName()Get legend layer namestatic java.util.List<java.lang.String>getLayerNames()Get layer namesLayerUpdateTypesgetLayerUpdateType()Get layer update typeLayoutMapgetLayoutMap()Get layout mapMapLayergetLegendLayer()Get legend layerLegendStylesgetLegendStyle()Get legend stylejava.awt.ColorgetNeatLineColor()Get neat line colorfloatgetNeatLineSize()Get neat line sizejava.lang.StringgetTitle()Get titlebooleanisDrawChartBreaks()Get if draw chart breaksbooleanisDrawNeatLine()Get if draw neat linebooleanisDrawPieLabel()Get if draw pie labelbooleanisForceDrawOutline()Get if force to draw polygon outline - for normal legendvoidmoveUpdate()Move update methodvoidonMapViewUpdated(MapViewUpdatedEvent e)voidpaint(java.awt.Graphics2D g)Paint methodvoidpaintGraphics(java.awt.Graphics2D g, PointF pageLocation, float zoom)Paint graphicsvoidpaintOnLayout(java.awt.Graphics2D g, PointF pageLocation, float zoom)Paint on layout methodvoidresizeUpdate()Resize update methodvoidsetColumnNumber(int value)Set column numbervoidsetDrawChartBreaks(boolean value)Set if draw chart breaksvoidsetDrawNeatLine(boolean istrue)Set if draw neat linevoidsetDrawPieLabel(boolean value)Set if draw pie labelvoidsetFont(java.awt.Font font)Set fontvoidsetForceDrawOutline(boolean value)Set if force to draw polygon outline - for normal legendvoidsetLayerName(java.lang.String name)Set legend layer namevoidsetLayerUpdateType(LayerUpdateTypes type)Set layer update typevoidsetLegendLayer(MapLayer layer)Set legend layervoidsetLegendStyle(LegendStyles style)Set legend stylevoidsetNeatLineColor(java.awt.Color color)Set neat line colorvoidsetNeatLineSize(float size)Set neat line sizevoidsetTitle(java.lang.String title)Set titlevoidupdateLegendSize()Update legend control size-
Methods inherited from class org.meteoinfo.layout.LayoutElement
addLocationChangedListener, addSizeChangedListener, fireLocationChangedEvent, fireSizeChangedEvent, getBackColor, getBottom, getBounds, getElementType, getForeColor, getHeight, getLeft, getResizeAbility, getRight, getTop, getWidth, isDrawBackColor, isSelected, isVisible, pageToScreen, removeLocationChangedListener, removeSizeChangedListener, setBackColor, setDrawBackColor, setElementType, setForeColor, setHeight, setLeft, setResizeAbility, setSelected, setTop, setVisible, setWidth
-
-
-
-
Method Detail
-
onMapViewUpdated
public void onMapViewUpdated(MapViewUpdatedEvent e)
-
getLayoutMap
public LayoutMap getLayoutMap()
Get layout map- Returns:
- The layout map
-
getLegendLayer
public MapLayer getLegendLayer()
Get legend layer- Returns:
- The legend alyer
-
setLegendLayer
public void setLegendLayer(MapLayer layer)
Set legend layer- Parameters:
layer- The legend layer
-
getLayerName
public java.lang.String getLayerName()
Get legend layer name- Returns:
- Legend layer name
-
setLayerName
public void setLayerName(java.lang.String name)
Set legend layer name- Parameters:
name- Layer name
-
isForceDrawOutline
public boolean isForceDrawOutline()
Get if force to draw polygon outline - for normal legend- Returns:
- Boolean
-
setForceDrawOutline
public void setForceDrawOutline(boolean value)
Set if force to draw polygon outline - for normal legend- Parameters:
value- Boolean
-
getLayerUpdateType
public LayerUpdateTypes getLayerUpdateType()
Get layer update type- Returns:
- Layer update type
-
setLayerUpdateType
public void setLayerUpdateType(LayerUpdateTypes type)
Set layer update type- Parameters:
type- Layer update type
-
getLegendStyle
public LegendStyles getLegendStyle()
Get legend style- Returns:
- Legend style
-
setLegendStyle
public void setLegendStyle(LegendStyles style)
Set legend style- Parameters:
style- Legend style
-
getTitle
public java.lang.String getTitle()
Get title- Returns:
- The title
-
setTitle
public void setTitle(java.lang.String title)
Set title- Parameters:
title- The title
-
isDrawNeatLine
public boolean isDrawNeatLine()
Get if draw neat line- Returns:
- If draw neat line
-
setDrawNeatLine
public void setDrawNeatLine(boolean istrue)
Set if draw neat line- Parameters:
istrue- If draw neat line
-
getNeatLineColor
public java.awt.Color getNeatLineColor()
Get neat line color- Returns:
- Neat line color
-
setNeatLineColor
public void setNeatLineColor(java.awt.Color color)
Set neat line color- Parameters:
color- Neat line color
-
getNeatLineSize
public float getNeatLineSize()
Get neat line size- Returns:
- Neat line size
-
setNeatLineSize
public void setNeatLineSize(float size)
Set neat line size- Parameters:
size- Neat line size
-
getFont
public java.awt.Font getFont()
Get font- Returns:
- The font
-
setFont
public void setFont(java.awt.Font font)
Set font- Parameters:
font- The font
-
getColumnNumber
public int getColumnNumber()
Get column number- Returns:
- Column number
-
setColumnNumber
public void setColumnNumber(int value)
Set column number- Parameters:
value- Column number
-
isDrawChartBreaks
public boolean isDrawChartBreaks()
Get if draw chart breaks- Returns:
- Boolean
-
setDrawChartBreaks
public void setDrawChartBreaks(boolean value)
Set if draw chart breaks- Parameters:
value- Boolean
-
isDrawPieLabel
public boolean isDrawPieLabel()
Get if draw pie label- Returns:
- Boolean
-
setDrawPieLabel
public void setDrawPieLabel(boolean value)
Set if draw pie label- Parameters:
value- Boolean
-
paintGraphics
public void paintGraphics(java.awt.Graphics2D g, PointF pageLocation, float zoom)Paint graphics- Parameters:
g- Graphics2DpageLocation- Page locationzoom- Zoom
-
updateLegendSize
public void updateLegendSize()
Update legend control size
-
paint
public void paint(java.awt.Graphics2D g)
Description copied from class:LayoutElementPaint method- Specified by:
paintin classLayoutElement- Parameters:
g- Graphics2D
-
paintOnLayout
public void paintOnLayout(java.awt.Graphics2D g, PointF pageLocation, float zoom)Description copied from class:LayoutElementPaint on layout method- Specified by:
paintOnLayoutin classLayoutElement- Parameters:
g- Grahpics2DpageLocation- Page locationzoom- Zoom
-
moveUpdate
public void moveUpdate()
Description copied from class:LayoutElementMove update method- Specified by:
moveUpdatein classLayoutElement
-
resizeUpdate
public void resizeUpdate()
Description copied from class:LayoutElementResize update method- Specified by:
resizeUpdatein classLayoutElement
-
getLayerNames
public static java.util.List<java.lang.String> getLayerNames()
Get layer names- Returns:
- Layer names
-
-