Changeset 27464 in osm for applications/editors/josm/plugins/turnrestrictions/src
- Timestamp:
- 2012-01-15T11:56:33+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.