- Timestamp:
- 07/02/13 16:20:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/gui/ObjectPanel.java
r85 r90 2 2 3 3 import com.framsticks.gui.controls.Control; 4 import com.framsticks.gui.controls.ControlOwner; 4 5 import com.framsticks.gui.controls.ValueControl; 5 6 import com.framsticks.gui.controls.ValueControlListener; … … 11 12 12 13 import javax.swing.*; 14 13 15 import java.util.Collection; 14 16 import java.util.HashMap; … … 18 20 19 21 @SuppressWarnings("serial") 20 public class ObjectPanel extends ModifiablePanel {22 public class ObjectPanel extends ModifiablePanel implements ControlOwner { 21 23 22 24 private static final Logger log = Logger.getLogger(ObjectPanel.class.getName()); … … 28 30 super(parameters); 29 31 30 Gui.fillWithControls(contentPanel, params, components); 32 Gui.fillWithControls(this, params, components, Control.class); 33 setName(framsClass.getId()); 31 34 32 35 for (final ValueControl c : filterInstanceof(components.values(), ValueControl.class)) { … … 44 47 }); 45 48 } 49 46 50 contentPanel.add(Box.createVerticalGlue()); 47 51 this.revalidate(); … … 74 78 } 75 79 76 frame. invokeLater(new RunAt<Frame>() {80 frame.dispatch(new RunAt<Frame>() { 77 81 @Override 78 82 public void run() { … … 97 101 } 98 102 103 @Override 104 public JPanel getPanel() { 105 return contentPanel; 106 } 107 108 @Override 109 public TreeNode getCurrentTreeNode() { 110 return super.getCurrentTreeNode(); 111 } 99 112 100 113 // public void updateValue() { 101 // 114 // //assert panel.getFrame().isActive(); 102 115 103 // 104 // 105 // 106 // 107 // 108 // 109 // 110 // 111 // 112 // 113 // 114 // 115 // 116 // 117 // 118 // 119 // 116 // final Node n = panel.getCurrentNode(); 117 // panel.getBrowser().getManager().invokeLater(new Runnable() { 118 // @Override 119 // public void run() { 120 // Object v = n.getAccess().get(param, Object.class); 121 // if (v == null) { 122 // v = param.getDef(Object.class); 123 // } 124 // final Object fv = v; 125 // panel.getBrowser().invokeLater(new Runnable() { 126 // @Override 127 // public void run() { 128 // setValueImpl(fv); 129 // } 130 // }); 131 // } 132 // }); 120 133 // } 121 134
Note: See TracChangeset
for help on using the changeset viewer.