Changeset 27464 in osm for applications/editors/josm/plugins
- Timestamp:
- 2012-01-15T11:56:33+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java
r16933 r27464 60 60 panel.add(new JLabel(tr("Course"))); 61 61 panel.add(courseLabel = new JLabel()); 62 add(new JScrollPane(panel), BorderLayout.CENTER);62 createLayout(panel, true, null); 63 63 } 64 64 -
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java
r25137 r27464 11 11 import java.awt.event.KeyEvent; 12 12 import java.text.DecimalFormat; 13 import java.util.Arrays; 13 14 import java.util.Collection; 14 15 … … 68 69 KeyEvent.VK_M, Shortcut.GROUP_LAYER), 150); 69 70 70 JPanel buttonPanel = new JPanel(new GridLayout(1,2));71 72 71 resetButton = new SideButton(marktr("Reset"), "select", "Measurement", 73 72 tr("Reset current measurement results and delete measurement path."), this); 74 buttonPanel.add(resetButton);75 add(buttonPanel, BorderLayout.SOUTH);76 73 77 74 JPanel valuePanel = new JPanel(new GridLayout(0,2)); … … 99 96 valuePanel.add(segAngleLabel); 100 97 101 add(valuePanel, BorderLayout.CENTER);98 this.setPreferredSize(new Dimension(0, 92)); 102 99 103 this.setPreferredSize(new Dimension(0, 92)); 100 createLayout(valuePanel, false, Arrays.asList(new SideButton[] { 101 resetButton 102 })); 103 104 104 final MeasurementDialog dlg = this; 105 105 -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java
r26509 r27464 9 9 import java.awt.event.ItemListener; 10 10 import java.awt.event.MouseEvent; 11 import java.util.Arrays; 11 12 import java.util.Collection; 12 13 import java.util.HashSet; … … 94 95 95 96 /** 96 * Builds the panel with the checkbox for switching between the two 97 * list views 98 * 99 * @return the panel 100 */ 101 protected JPanel buildInSelectionOnlyTogglePanel(){ 97 * Builds the UI 98 */ 99 protected void build() { 102 100 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT,0,0)); 103 101 pnl.setBorder(null); … … 106 104 "<html>Select to display turn restrictions related to object in the current selection only.<br>" 107 105 + "Deselect to display all turn restrictions in the current data set.</html>")); 108 return pnl; 109 } 110 111 /** 112 * Builds the panel with the action buttons 113 * 114 * @return the panel 115 */ 116 protected JPanel buildCommandPanel() { 117 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT,0,0)); 118 pnl.setBorder(null); 119 pnl.add(new SideButton(actNew = new NewAction(), false /* don't show the name */)); 120 pnl.add(new SideButton(actEdit = new EditAction(), false /* don't show the name */)); 121 pnl.add(new SideButton(actDelete = new DeleteAction(), false /* don't show the name */)); 122 106 107 pnlContent = new JPanel(new BorderLayout(0,0)); 108 pnlContent.setBorder(null); 109 pnlContent.add(pnl, BorderLayout.NORTH); 110 111 actNew = new NewAction(); 112 actEdit = new EditAction(); 113 actDelete = new DeleteAction(); 123 114 actSelectSelectedTurnRestrictions = new SelectSelectedTurnRestrictions(); 124 115 actZoomTo = new ZoomToAction(); 125 return pnl; 126 } 127 128 /** 129 * Builds the UI 130 */ 131 protected void build() { 132 pnlContent = new JPanel(new BorderLayout(0,0)); 133 pnlContent.setBorder(null); 134 pnlContent.add(buildInSelectionOnlyTogglePanel(), BorderLayout.NORTH); 135 pnlContent.add(buildCommandPanel(), BorderLayout.SOUTH); 136 137 add(pnlContent, BorderLayout.CENTER); 116 117 createLayout(pnlContent, false, Arrays.asList(new SideButton[] { 118 new SideButton(actNew, false /* don't show the name */), 119 new SideButton(actEdit, false /* don't show the name */), 120 new SideButton(actDelete, false /* don't show the name */) 121 })); 138 122 139 123 // create the two list views
Note:
See TracChangeset
for help on using the changeset viewer.