Class GPXSettingsPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.openstreetmap.josm.gui.preferences.display.GPXSettingsPanel
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible,PreferenceTabbedPane.ValidationListener
Panel for GPX settings.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JosmComboBox<String>private final JosmTextFieldprivate final JCheckBoxprivate final JCheckBoxprivate final JRadioButtonprivate final JRadioButtonprivate final JRadioButtonprivate final JRadioButtonprivate final JRadioButtonprivate final JSliderprivate final JSliderprivate final JCheckBoxprivate final JosmComboBox<String>private final JRadioButtonprivate final JRadioButtonprivate final JRadioButtonprivate final JRadioButtonprivate final JRadioButtonprivate final JosmComboBox<String>private final JCheckBoxprivate final JCheckBoxprivate final JosmTextFieldprivate final JosmTextFieldprivate final JCheckBoxprivate ActionListenerprivate final JRadioButtonprivate final JRadioButtonprivate final JRadioButtonprivate final JRadioButtonprivate final JosmTextFieldprivate final JosmTextFieldprivate final GpxLayerprivate final JCheckBoxprivate final booleanprivate final booleanprivate final booleanprivate static final String[]private static final String[]private final JCheckBoxprivate final JCheckBoxprivate final JCheckBoxprivate static final intprivate final JosmComboBox<String>private final JosmTextFieldFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newGPXSettingsPanel.GPXSettingsPanel(List<GpxLayer> layers) Constructs a newGPXSettingsPanelfor the given layers. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetDataPref(IGpxLayerPrefs data, String key) Reads the preference for the given layer or the default preference if not availablestatic intgetDataPrefInt(IGpxLayerPrefs data, String key) Reads the integer preference for the given data or the default preference if not availablestatic StringgetLayerPref(GpxLayer layer, String key) Reads the preference for the given layer or the default preference if not availablestatic intgetLayerPrefInt(GpxLayer layer, String key) Reads the integer preference for the given layer or the default preference if not availableprivate voidfinal voidLoads preferences to UI controlsprivate Stringprivate booleanprivate intprivate intprefIntLocal(String key) static voidputDataPrefLocal(IGpxLayerPrefs data, String key, String value) Puts the preference for the given layerstatic voidputLayerPref(List<GpxLayer> layers, String key, Object value) Puts the preference for the given layers or the default preference if layers isnullstatic voidputLayerPrefLocal(GpxLayer layer, String key, String value) Puts the preference for the given layerprivate voidbooleanSave preferences from UI controls, globally or for the specified layers.static StringtryGetDataPrefLocal(IGpxLayerPrefs data, String key) Try to read the preference for the given GpxDatastatic StringtryGetLayerPrefLocal(GpxLayer layer, String key) Try to read the preference for the given layerprivate static voidupdateWaypointLabelCombobox(JosmComboBox<String> cb, JosmTextField tf, String labelPattern) private static voidbooleanDetermines if preferences can be saved.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
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, updateMethods inherited from class java.awt.Container
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, validateTreeMethods inherited from class java.awt.Component
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, getName, getParent, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
WAYPOINT_LABEL_CUSTOM
- See Also:
-
LABEL_PATTERN_TEMPLATE
-
LABEL_PATTERN_DESC
-
drawRawGpsLinesGlobal
-
drawRawGpsLinesAll
-
drawRawGpsLinesLocal
-
drawRawGpsLinesNone
-
drawRawGpsLinesActionListener
-
drawRawGpsMaxLineLength
-
drawRawGpsMaxLineLengthLocal
-
drawLineWidth
-
forceRawGpsLines
-
largeGpsPoints
-
circleGpsPoints
-
circleDataSource
-
colorTypeVelocity
-
colorTypeDirection
-
colorTypeDilution
-
colorTypeQuality
-
colorTypeFix
-
colorTypeRef
-
colorTypeTime
-
colorTypeHeatMap
-
colorTypeNone
-
colorTypeGlobal
-
colorTypeVelocityTune
-
colorTypeHeatMapTune
-
colorTypeHeatMapPoints
-
colorTypeHeatMapGain
-
colorTypeHeatMapLowerLimit
-
makeAutoMarkers
-
drawGpsArrows
-
drawGpsArrowsFast
-
drawGpsArrowsMinDist
-
colorDynamic
-
waypointLabel
-
waypointLabelPattern
-
audioWaypointLabel
-
audioWaypointLabelPattern
-
useGpsAntialiasing
-
drawLineWithAlpha
-
layers
-
firstLayer
-
global
-
hasLocalFile
-
hasNonLocalFile
-
DEFAULT_PREFS
-
-
Constructor Details
-
GPXSettingsPanel
Constructs a newGPXSettingsPanelfor the given layers.- Parameters:
layers- the GPX layers
-
GPXSettingsPanel
public GPXSettingsPanel()Constructs a newGPXSettingsPanel.
-
-
Method Details
-
getDefaultPrefs
-
getLayerPref
Reads the preference for the given layer or the default preference if not available- Parameters:
layer- the GpxLayer. Can benull, default preference will be returned thenkey- the drawing key to be read, without "draw.rawgps."- Returns:
- the value
-
getDataPref
Reads the preference for the given layer or the default preference if not available- Parameters:
data- the data. Can benull, default preference will be returned thenkey- the drawing key to be read, without "draw.rawgps."- Returns:
- the value
- Since:
- 18287
-
getLayerPrefInt
Reads the integer preference for the given layer or the default preference if not available- Parameters:
layer- the GpxLayer. Can benull, default preference will be returned thenkey- the drawing key to be read, without "draw.rawgps."- Returns:
- the integer value
-
getDataPrefInt
Reads the integer preference for the given data or the default preference if not available- Parameters:
data- the data. Can benull, default preference will be returned thenkey- the drawing key to be read, without "draw.rawgps."- Returns:
- the integer value
- Since:
- 18287
-
tryGetLayerPrefLocal
Try to read the preference for the given layer- Parameters:
layer- the GpxLayerkey- the drawing key to be read, without "draw.rawgps."- Returns:
- the value or
nullif not found
-
tryGetDataPrefLocal
Try to read the preference for the given GpxData- Parameters:
data- the GpxDatakey- the drawing key to be read, without "draw.rawgps."- Returns:
- the value or
nullif not found
-
putLayerPref
Puts the preference for the given layers or the default preference if layers isnull- Parameters:
layers- List ofGpxLayerto put the drawingOptionskey- the drawing key to be written, without "draw.rawgps."value- (can benullto remove option)
-
putLayerPrefLocal
Puts the preference for the given layer- Parameters:
layer-GpxLayerto put the drawingOptionskey- the drawing key to be written, without "draw.rawgps."value- the value ornullto remove key
-
putDataPrefLocal
Puts the preference for the given layer- Parameters:
data-GpxDatato put the drawingOptions. Must not benullkey- the drawing key to be written, without "draw.rawgps."value- the value ornullto remove key- Since:
- 18287
-
pref
-
prefBool
-
prefInt
-
prefIntLocal
-
putPref
-
initComponents
-
loadPreferences
Loads preferences to UI controls -
savePreferences
Save preferences from UI controls, globally or for the specified layers.- Returns:
truewhen restart is required,falseotherwise
-
updateWaypointLabelCombobox
private static void updateWaypointLabelCombobox(JosmComboBox<String> cb, JosmTextField tf, String labelPattern) -
updateWaypointPattern
-
validatePreferences
Description copied from interface:PreferenceTabbedPane.ValidationListenerDetermines if preferences can be saved.- Specified by:
validatePreferencesin interfacePreferenceTabbedPane.ValidationListener- Returns:
- True if preferences can be saved
-