mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
consolidate case for property labels
This commit is contained in:
@@ -70,7 +70,7 @@ public abstract class AbstractSchematicLeadedSymbol<T> extends AbstractLeadedCom
|
||||
}
|
||||
}
|
||||
|
||||
@EditableProperty(name = "Label position")
|
||||
@EditableProperty(name = "Label Position")
|
||||
public LabelPosition getLabelPosition() {
|
||||
return labelPosition;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -405,7 +405,7 @@ public class PotentiometerPanel extends AbstractPotentiometer {
|
||||
body = null;
|
||||
}
|
||||
|
||||
@EditableProperty(name = "Lug size")
|
||||
@EditableProperty(name = "Lug Size")
|
||||
public Size getLugDiameter() {
|
||||
return lugDiameter;
|
||||
}
|
||||
@@ -433,7 +433,7 @@ public class PotentiometerPanel extends AbstractPotentiometer {
|
||||
this.borderColor = borderColor;
|
||||
}
|
||||
|
||||
@EditableProperty(name = "Show shaft")
|
||||
@EditableProperty(name = "Show Shaft")
|
||||
public boolean getShowShaft() {
|
||||
return showShaft;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public class Resistor extends AbstractLeadedComponent<Resistance> {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@EditableProperty(name = "Power rating")
|
||||
@EditableProperty(name = "Power Rating")
|
||||
public org.diylc.core.measures.Power getPowerNew() {
|
||||
return powerNew;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ResistorSymbol extends AbstractSchematicLeadedSymbol<Resistance> {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@EditableProperty(name = "Power rating")
|
||||
@EditableProperty(name = "Power Rating")
|
||||
public org.diylc.core.measures.Power getPowerNew() {
|
||||
// Backward compatibility
|
||||
if (powerNew == null) {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -64,13 +64,15 @@ class ComponentTabbedPane extends JTabbedPane {
|
||||
public static int SCROLL_STEP = Presenter.ICON_SIZE + ComponentButtonFactory.MARGIN * 2 + 2;
|
||||
|
||||
private final IPlugInPort plugInPort;
|
||||
private Container recentToolbar;
|
||||
private Container recentToolbar;
|
||||
private Container buildingBlocksToolbar;
|
||||
private List<String> pendingRecentComponents = null;
|
||||
|
||||
public ComponentTabbedPane(IPlugInPort plugInPort) {
|
||||
super();
|
||||
this.plugInPort = plugInPort;
|
||||
addTab("Recently Used", createRecentComponentsPanel());
|
||||
addTab("Recently Used", createRecentComponentsPanel());
|
||||
// addTab("Building Blocks", createBuildingBlocksPanel());
|
||||
Map<String, List<ComponentType>> componentTypes = plugInPort.getComponentTypes();
|
||||
List<String> categories = new ArrayList<String>(componentTypes.keySet());
|
||||
Collections.sort(categories);
|
||||
@@ -152,6 +154,14 @@ class ComponentTabbedPane extends JTabbedPane {
|
||||
recentToolbar.setLayout(new BoxLayout(recentToolbar, BoxLayout.X_AXIS));
|
||||
}
|
||||
return recentToolbar;
|
||||
}
|
||||
|
||||
public Container getBuildingBlocksToolbar() {
|
||||
if (buildingBlocksToolbar == null) {
|
||||
buildingBlocksToolbar = new Container();
|
||||
buildingBlocksToolbar.setLayout(new BoxLayout(buildingBlocksToolbar, BoxLayout.X_AXIS));
|
||||
}
|
||||
return buildingBlocksToolbar;
|
||||
}
|
||||
|
||||
private Component createComponentPanel(List<ComponentType> componentTypes) {
|
||||
@@ -193,7 +203,33 @@ class ComponentTabbedPane extends JTabbedPane {
|
||||
panel.add(toolbar, BorderLayout.CENTER);
|
||||
|
||||
return panel;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Component createBuildingBlocksPanel() {
|
||||
JPanel panel = new JPanel(new BorderLayout());
|
||||
panel.setOpaque(false);
|
||||
|
||||
final Container toolbar = getBuildingBlocksToolbar();
|
||||
// refreshRecentComponentsToolbar(
|
||||
// toolbar,
|
||||
// (List<String>) ConfigurationManager.getInstance().readObject(IPlugInPort.RECENT_COMPONENTS_KEY,
|
||||
// new ArrayList<String>()));
|
||||
// ConfigurationManager.getInstance().addConfigListener(IPlugInPort.RECENT_COMPONENTS_KEY, new IConfigListener() {
|
||||
//
|
||||
// @Override
|
||||
// public void valueChanged(String key, Object value) {
|
||||
// // Cache the new list, we'll refresh when there's a
|
||||
// // chance
|
||||
// pendingRecentComponents = (List<String>) value;
|
||||
// }
|
||||
// });
|
||||
|
||||
panel.add(toolbar, BorderLayout.CENTER);
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void refreshRecentComponentsToolbar(Container toolbar, List<String> recentComponentClassList) {
|
||||
|
||||
Reference in New Issue
Block a user