es.prodevelop.gvsig.mobile.gui.dialog.control
Class LegendIcon

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byes.prodevelop.gvsig.mobile.gui.dialog.control.LegendIcon
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class LegendIcon
extends java.awt.Panel

This class is used to show a sample of the current symbology by drawing a little polygon/line/point with the current colors, width, etc.

Author:
jldominguez
See Also:
FSymbol, Serialized Form

Field Summary
static int LAYER_RASTER_TYPE
           
static int LEGEND_ICON_MARGIN_LEFT
           
static int LEGEND_ICON_MARGIN_UP
           
static int RASTER_ICON_H
           
static int RASTER_ICON_W
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
LegendIcon()
          Constructor.
LegendIcon(int type)
          Constructor.
LegendIcon(int shapeType, FSymbol sym)
          Constructor
 
Method Summary
 FSymbol getSymbol()
          gets the symbol that is being represented.
 int getVectType()
          Gets shape type of the layer or FShape.NULL if it's not a vector layer.
 void paint(java.awt.Graphics _g)
          Overriden paint method.
 void setSymbol(FSymbol s)
          Sets the symbol to be represented
 void setVectType(int t)
          Sets the shape type of the layer.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LAYER_RASTER_TYPE

public static final int LAYER_RASTER_TYPE
See Also:
Constant Field Values

RASTER_ICON_W

public static final int RASTER_ICON_W
See Also:
Constant Field Values

RASTER_ICON_H

public static final int RASTER_ICON_H
See Also:
Constant Field Values

LEGEND_ICON_MARGIN_UP

public static final int LEGEND_ICON_MARGIN_UP
See Also:
Constant Field Values

LEGEND_ICON_MARGIN_LEFT

public static final int LEGEND_ICON_MARGIN_LEFT
See Also:
Constant Field Values
Constructor Detail

LegendIcon

public LegendIcon(int shapeType,
                  FSymbol sym)
Constructor

Parameters:
shapeType - vector shape type of the layer
sym - symbol to be represnted

LegendIcon

public LegendIcon(int type)
Constructor.

Parameters:
type - shape type of the vector layer. Defaulñt value will be used for symbol.

LegendIcon

public LegendIcon()
Constructor. Defaulñt value will be used for symbol and shape type.

Method Detail

paint

public void paint(java.awt.Graphics _g)
Overriden paint method. It will draw a little sample of the symbology depending on the shape type and the symbol.


getVectType

public int getVectType()
Gets shape type of the layer or FShape.NULL if it's not a vector layer.

Returns:

setVectType

public void setVectType(int t)
Sets the shape type of the layer.

Parameters:
t -

getSymbol

public FSymbol getSymbol()
gets the symbol that is being represented.

Returns:
the symbol that is being represented.

setSymbol

public void setSymbol(FSymbol s)
Sets the symbol to be represented

Parameters:
s - the symbol to be represented