summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing
diff options
context:
space:
mode:
Diffstat (limited to 'projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing')
-rw-r--r--projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/TreeColumnAssociation.java5
-rw-r--r--projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/components/InfoPanel.java10
2 files changed, 9 insertions, 6 deletions
diff --git a/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/TreeColumnAssociation.java b/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/TreeColumnAssociation.java
index 26f2eda..36eb40f 100644
--- a/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/TreeColumnAssociation.java
+++ b/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/TreeColumnAssociation.java
@@ -121,6 +121,7 @@ public class TreeColumnAssociation extends TableColumnAssociation {
* Binds the specified aspect of this association to the specified key on the
* specified display group.
*/
+ @Override
public void bindAspect(String anAspect, EODisplayGroup aDisplayGroup, String aKey) {
if (ChildrenAspect.equals(anAspect)) {
childrenDisplayGroup = aDisplayGroup;
@@ -137,6 +138,7 @@ public class TreeColumnAssociation extends TableColumnAssociation {
* Overridden to call createTree if necessary, call configureColumn, call
* createTreeAssociation if necessary, and then call to super.
*/
+ @Override
public void establishConnection() {
if (tree == null) {
tree = createTree();
@@ -161,7 +163,7 @@ public class TreeColumnAssociation extends TableColumnAssociation {
treeAssociation.establishConnection();
- table.setRowHeight(tree.getRowHeight());
+ table.setRowHeight(Math.max(1, tree.getRowHeight()));
super.establishConnection();
@@ -175,6 +177,7 @@ public class TreeColumnAssociation extends TableColumnAssociation {
* Breaks the connection between this association and its object. Override to
* stop listening for events from the object.
*/
+ @Override
public void breakConnection() {
super.breakConnection();
treeAssociation.breakConnection();
diff --git a/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/components/InfoPanel.java b/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/components/InfoPanel.java
index a2c0182..06938e9 100644
--- a/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/components/InfoPanel.java
+++ b/projects/net.wotonomy.ui.swing/src/main/java/net/wotonomy/ui/swing/components/InfoPanel.java
@@ -100,9 +100,9 @@ public class InfoPanel extends JPanel implements ActionListener {
protected int vgap; // set in constructor
protected int margin; // set in constructor
protected int columns; // set in constructor
- protected List fields = null;
- protected List labels = null;
- protected List fieldSpacers = null;
+ protected List<Component> fields = null;
+ protected List<Component> labels = null;
+ protected List<Component> fieldSpacers = null;
protected ButtonPanel buttonPanel = null;
protected boolean isEditable = true;
protected String prefix;
@@ -124,8 +124,8 @@ public class InfoPanel extends JPanel implements ActionListener {
margin = 0; // default margin: none
prefix = ""; // default prefix: none
postfix = ":"; // per java l&f guidelines
- fields = new ArrayList();
- labels = new ArrayList();
+ fields = new ArrayList<>();
+ labels = new ArrayList<>();
labelAnchor = GridBagConstraints.NORTHWEST;
// per java l&f guidelines (CENTER is nicer)
labelAlign = SwingConstants.LEFT;