public class DamnDialog extends org.openstreetmap.josm.gui.dialogs.ToggleDialog implements PostDoneSquareCallback, PostSplitSquareCallback, PostReviewSquareCallback, PostMapSquareCallback, PostReviewAreaCallback, PostLockSquareOfAreaCallback, PostMapAreaCallback, GetAreaCallback, GetAreaGeometryCallback, GetWorkingOnCallback, GetAreasCallback
The client for Divide and map. Now. -- the damn project.
org.openstreetmap.josm.gui.dialogs.ToggleDialog.ButtonHidingType, org.openstreetmap.josm.gui.dialogs.ToggleDialog.TitleBar, org.openstreetmap.josm.gui.dialogs.ToggleDialog.ToggleDialogAction
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
button, buttonHiding, detachedDialog, dialogsPanel, isCollapsed, isDocked, isShowing, name, preferenceClass, preferencePrefix, PROP_DYNAMIC_BUTTONS, titleBar, toggleAction, windowMenuItem
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
DamnDialog()
Constructs a new
DamnDialog . |
Modifier and Type | Method and Description |
---|---|
void |
addDamnLayer(javax.json.JsonObject gotSquare)
Add new layer with square data.
|
void |
authed()
Check if token in preferences, authenticate otherwise.
|
void |
change1(java.awt.Component data)
Change component at index 1.
|
void |
change2(java.util.Collection<org.openstreetmap.josm.gui.SideButton> nb)
Change component at index 2.
|
static java.util.List<org.openstreetmap.josm.data.gpx.WayPoint> |
coords_to_trkseg(java.lang.String type,
javax.json.JsonArray coordinates) |
static javax.json.JsonObject |
get_jwt(java.lang.String token)
Decode JWT
|
void |
onGetArea(javax.json.JsonObject callArea,
javax.json.JsonObject gotArea)
Show area info.
|
void |
onGetAreaGeometry(javax.json.JsonObject gotAreaGeometry)
Show area geometry.
|
void |
onGetAreas(javax.json.JsonArray ja)
Show areas.
|
void |
onGetWorkingOn(javax.json.JsonArray ja)
Show working on info.
|
void |
onPostDoneSquare(javax.json.JsonObject doneSquare,
javax.json.JsonObject gotSquare)
Show area info after square marked done.
|
void |
onPostLockSquareOfArea(javax.json.JsonObject mapArea,
javax.json.JsonObject gotSquare)
Consider manual square lock as mapping.
|
void |
onPostMapArea(javax.json.JsonObject mapArea,
javax.json.JsonObject gotSquare)
Show square info after map area request.
|
void |
onPostMapSquare(javax.json.JsonObject mapSquare,
javax.json.JsonObject gotCommit)
Show area info after square marked to map.
|
void |
onPostReviewArea(javax.json.JsonObject reviewArea,
javax.json.JsonObject gotSquare)
Show square info after review square request.
|
void |
onPostReviewSquare(javax.json.JsonObject reviewSquare,
javax.json.JsonObject gotCommit)
Show area info after marked to review request.
|
void |
onPostSplitSquare(javax.json.JsonObject splitSquare,
javax.json.JsonObject splittedSquare)
Show area after marked splitted request.
|
void |
preferenceChanged(org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent e) |
static boolean |
removeDamnLayers()
Remove layers added by
addDamnLayer . |
buttonHidden, buttonShown, clearButtonActions, closeDetachedDialog, collapse, createLayout, createLayout, destroy, detach, dock, dockWhenClosingDetachedDlg, eventDispatched, expand, getButton, getDefaultDetachedSize, getLastHeight, getName, getPreferencePrefix, getPreferredHeight, getToggleAction, helpTopic, hideDialog, hideNotify, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, registerInWindowMenu, rememberHeight, setButton, setContentVisible, setDialogsPanel, setIsButtonHiding, setIsCollapsed, setIsDocked, setIsShowing, setTitle, showDialog, showNotify, stateChanged, toggleButtonHook, toString, unfurlDialog
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public void authed()
public void change1(java.awt.Component data)
public void change2(java.util.Collection<org.openstreetmap.josm.gui.SideButton> nb)
public static javax.json.JsonObject get_jwt(java.lang.String token)
public static java.util.List<org.openstreetmap.josm.data.gpx.WayPoint> coords_to_trkseg(java.lang.String type, javax.json.JsonArray coordinates)
public void addDamnLayer(javax.json.JsonObject gotSquare)
Add square border and download OpenStreetMap data.
gotSquare
- A square from damn server.public static boolean removeDamnLayers()
addDamnLayer
.public void preferenceChanged(org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent e)
preferenceChanged
in interface org.openstreetmap.josm.spi.preferences.PreferenceChangedListener
preferenceChanged
in class org.openstreetmap.josm.gui.dialogs.ToggleDialog
public void onGetArea(javax.json.JsonObject callArea, javax.json.JsonObject gotArea)
onGetArea
in interface GetAreaCallback
public void onGetAreaGeometry(javax.json.JsonObject gotAreaGeometry)
onGetAreaGeometry
in interface GetAreaGeometryCallback
public void onGetAreas(javax.json.JsonArray ja)
onGetAreas
in interface GetAreasCallback
public void onGetWorkingOn(javax.json.JsonArray ja)
onGetWorkingOn
in interface GetWorkingOnCallback
public void onPostDoneSquare(javax.json.JsonObject doneSquare, javax.json.JsonObject gotSquare)
onPostDoneSquare
in interface PostDoneSquareCallback
public void onPostLockSquareOfArea(javax.json.JsonObject mapArea, javax.json.JsonObject gotSquare)
onPostLockSquareOfArea
in interface PostLockSquareOfAreaCallback
public void onPostMapArea(javax.json.JsonObject mapArea, javax.json.JsonObject gotSquare)
onPostMapArea
in interface PostMapAreaCallback
public void onPostMapSquare(javax.json.JsonObject mapSquare, javax.json.JsonObject gotCommit)
onPostMapSquare
in interface PostMapSquareCallback
public void onPostReviewArea(javax.json.JsonObject reviewArea, javax.json.JsonObject gotSquare)
onPostReviewArea
in interface PostReviewAreaCallback
public void onPostReviewSquare(javax.json.JsonObject reviewSquare, javax.json.JsonObject gotCommit)
onPostReviewSquare
in interface PostReviewSquareCallback
public void onPostSplitSquare(javax.json.JsonObject splitSquare, javax.json.JsonObject splittedSquare)
onPostSplitSquare
in interface PostSplitSquareCallback