|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
es.prodevelop.gvsig.mobile.gui.dialog.control.LayersTable
This class represents the TOC (the list of layers in the curretn view/project) Keeps a reference to the MapControl and consists of a set of rows (class LayersTableItem), one for each layer. Changes in the order of the layers are performed by this class, and it calls the MapContext to perform the redrawing. On the right side of the TOC there are some buttons that act on the selected layer. The number of selected layers can be zero or one. The forst row of the table (the one with the names of the columns) is also a LayersTableItem, created with a different constructor.
MapControl
,
ViewLayersGraphicStatus
,
LayersTableItem
,
Serialized FormField Summary |
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 | |
LayersTable(int w,
MapControl mc)
Constructor. |
Method Summary | |
int |
addItem(FLayer lyr,
boolean title)
Adfds a new layer to the TOC. |
void |
extentChanged(ExtentEvent e,
boolean repaint)
The TOC also listens to extent changes in the viewport, since the scale visibility icons need to be updated. |
FLayer[] |
getLayers()
Get current layers. |
MapControl |
getMapControl()
|
double |
getScale()
Gets the current scale. |
int |
getSelectedIndex()
Gets the index of the elected layer. |
int |
getWidth()
|
boolean |
isProcessing()
Unused. |
void |
moveSelectedDown()
|
void |
moveSelectedUp()
Moves up one position the selected layer. |
void |
paint(java.awt.Graphics g)
|
void |
redraw(boolean clear)
Unused. |
void |
refresh(boolean update)
Unused. |
void |
removeItem(int one_based_ind)
Removes i-th layer from the TOC |
boolean |
sameAsLastStore()
Checks whether the symbology settings of the layers have changed. |
void |
setOffsetAndRefresh(int x,
int y,
boolean refresh)
Unused. |
void |
setProcessing(boolean b)
Unused. |
void |
storeStatus()
Keeps a copy of the current graphic settings of the layers. |
void |
unselectAll()
Unselects all layers. |
void |
updateItem(FLayer lyr)
Updates row associated with a layer |
void |
updateScaleVisibilityIcons()
Update scale visibility icons. |
void |
zoomToSelected()
Performs a zoom to the extent of the selected 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, 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 |
Constructor Detail |
public LayersTable(int w, MapControl mc)
w
- width in pixels of the table.mc
- A reference to the MapControlMethod Detail |
public double getScale()
public void removeItem(int one_based_ind)
one_based_ind
- the index of the layer to be removedpublic void unselectAll()
public int addItem(FLayer lyr, boolean title)
lyr
- the layer to be addedtitle
- whether it's the false layer that works as the title. must be false
when used normally
public FLayer[] getLayers()
public void storeStatus()
public boolean sameAsLastStore()
public void refresh(boolean update)
refresh
in interface Refreshable
update
- whether the object has to be updated (deeper refreshment)public void redraw(boolean clear)
redraw
in interface Refreshable
clear
- whether the object has to be cleared before drawing againpublic void setOffsetAndRefresh(int x, int y, boolean refresh)
setOffsetAndRefresh
in interface Refreshable
x
- new x offsety
- new y offsetrefresh
- whether a new refresh has to be donepublic void setProcessing(boolean b)
setProcessing
in interface Refreshable
b
- public boolean isProcessing()
isProcessing
in interface Refreshable
public void paint(java.awt.Graphics g)
public void updateScaleVisibilityIcons()
public void updateItem(FLayer lyr)
lyr
- layer whose row must be updated,public void moveSelectedDown()
public void moveSelectedUp()
public MapControl getMapControl()
public int getSelectedIndex()
public int getWidth()
public void zoomToSelected()
public void extentChanged(ExtentEvent e, boolean repaint)
extentChanged
in interface ViewPortListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |