|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.gui.MapStatus.Collector
private final class MapStatus.Collector
The collector class that waits for notification and then update the display objects.
Field Summary | |
---|---|
private java.awt.Point |
oldMousePos
the mouse position of the previous iteration. |
private MapFrame |
parent
|
private javax.swing.Popup |
popup
The popup displayed to show additional information |
private java.util.List<javax.swing.JLabel> |
popupLabels
Contains the labels that are currently shown in the information popup |
Constructor Summary | |
---|---|
MapStatus.Collector(MapFrame parent)
|
Method Summary | |
---|---|
private javax.swing.JLabel |
popupBuildPrimitiveLabels(OsmPrimitive osm)
Builds the labels with all necessary listeners for the info popup for the given OsmPrimitive |
private javax.swing.Popup |
popupCreatePopup(java.awt.Component content,
MapStatus.MouseState ms)
Creates a popup for the given content next to the cursor. |
private void |
popupCycleSelection(java.util.Collection<OsmPrimitive> osms,
int mods)
Call this with a set of primitives to cycle through them. |
private void |
popupHidePopup()
Tries to hide the given popup |
private void |
popupSetLabelColors(javax.swing.JLabel lbl,
OsmPrimitive osm)
Sets the colors for the given label depending on the selected status of the given OsmPrimitive |
private void |
popupShowPopup(javax.swing.Popup newPopup,
java.util.List<javax.swing.JLabel> lbls)
Tries to show the given popup, can be hidden using popupHideOldPopup If an old popup exists, it will be automatically hidden |
private void |
popupUpdateLabels()
This method should be called if the selection may have changed from outside of this class. |
void |
run()
Execution function for the Collector. |
private void |
statusBarElementUpdate(MapStatus.MouseState ms)
Calls this to update the element that is shown in the statusbar |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.awt.Point oldMousePos
private java.util.List<javax.swing.JLabel> popupLabels
private javax.swing.Popup popup
private MapFrame parent
Constructor Detail |
---|
public MapStatus.Collector(MapFrame parent)
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
private final javax.swing.Popup popupCreatePopup(java.awt.Component content, MapStatus.MouseState ms)
content
- ms
-
private final void statusBarElementUpdate(MapStatus.MouseState ms)
ms
- private final void popupCycleSelection(java.util.Collection<OsmPrimitive> osms, int mods)
osms
- mouse
- modifiersprivate final void popupHidePopup()
popup
- private final void popupShowPopup(javax.swing.Popup newPopup, java.util.List<javax.swing.JLabel> lbls)
popup
- private final void popupUpdateLabels()
private final void popupSetLabelColors(javax.swing.JLabel lbl, OsmPrimitive osm)
lbl
- The label to colorosm
- The primitive to derive the colors fromprivate final javax.swing.JLabel popupBuildPrimitiveLabels(OsmPrimitive osm)
osm
- The primitive to create the label for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |