Add usage instructions to preset dialog

This commit is contained in:
Sampo Niskanen 2012-09-27 16:36:45 +00:00
parent 22ee569d32
commit bfe48265e6
3 changed files with 8 additions and 2 deletions

View File

@ -1731,6 +1731,7 @@ ComponentPresetChooserDialog.menu.sortAsc = Sort Ascending
ComponentPresetChooserDialog.menu.sortDesc = Sort Descending
ComponentPresetChooserDialog.menu.units = Units
ComponentPresetChooserDialog.checkbox.showAllCompatible = Show all compatible
ComponentPresetChooserDialog.lbl.favorites = Select to add preset to drop-down menu
table.column.Favorite = Favorite
table.column.Manufacturer = Manufacturer
table.column.PartNo = Part Number

View File

@ -32,6 +32,7 @@ import net.sf.openrocket.preset.TypedKey;
import net.sf.openrocket.rocketcomponent.RocketComponent;
import net.sf.openrocket.rocketcomponent.SymmetricComponent;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.Chars;
/**
* Dialog shown for selecting a preset component.
@ -137,7 +138,9 @@ public class ComponentPresetChooserDialog extends JDialog {
JScrollPane scrollpane = new JScrollPane();
scrollpane.setViewportView(componentSelectionTable);
panel.add(scrollpane, "grow, width 700lp, height 300lp, spanx, wrap para");
panel.add(scrollpane, "grow, width 700lp, height 300lp, spanx, wrap rel");
panel.add(new JLabel(Chars.UP_ARROW + " " + trans.get("lbl.favorites")), "spanx, gapleft 5px, wrap para");
// OK / Cancel buttons
@ -238,7 +241,7 @@ public class ComponentPresetChooserDialog extends JDialog {
if (!okClicked)
return null;
int row = componentSelectionTable.getSelectedRow();
if ( row < 0 ) {
if (row < 0) {
// Nothing selected.
return null;
}

View File

@ -57,5 +57,7 @@ public class Chars {
public static final char LEFT_ARROW = '\u2190';
/** Right arrow (light) */
public static final char RIGHT_ARROW = '\u2192';
/** Up arrow (light) */
public static final char UP_ARROW = '\u2191';
}