|
|
@ -697,7 +697,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> { |
|
|
|
((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(2); |
|
|
|
((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(2); |
|
|
|
|
|
|
|
|
|
|
|
//设置Column 2的Editor
|
|
|
|
//设置Column 2的Editor
|
|
|
|
column2.setCellEditor(new ColumnValueEditor(DBManipulationPane.this)); |
|
|
|
column2.setCellEditor(new ColumnValueEditor()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -864,43 +864,19 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private final UILabel textLabel; |
|
|
|
private final UILabel textLabel; |
|
|
|
private final ValuePane vPane; |
|
|
|
private final ValuePane vPane; |
|
|
|
private final BasicDialog vPaneDLG; |
|
|
|
|
|
|
|
private Component parent; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 列值编辑器 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param parent 父组件,通过指定父组件启动下一级子窗口 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
protected ColumnValueEditor(Component parent) { |
|
|
|
|
|
|
|
this(v_Types, parent); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Deprecated |
|
|
|
|
|
|
|
protected ColumnValueEditor() { |
|
|
|
protected ColumnValueEditor() { |
|
|
|
this(v_Types, null); |
|
|
|
this(v_Types); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 列值编辑器 |
|
|
|
* 列值编辑器 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param types 编辑器类型 |
|
|
|
* @param types 编辑器类型 |
|
|
|
* @param parent 父组件,通过指定父组件启动下一级子窗口 |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected ColumnValueEditor(Editor<?>[] types, Component parent) { |
|
|
|
protected ColumnValueEditor(Editor<?>[] types) { |
|
|
|
textLabel = new UILabel(); |
|
|
|
textLabel = new UILabel(); |
|
|
|
textLabel.addMouseListener(new MouseAdapter() { |
|
|
|
DialogActionAdapter adapter = new DialogActionAdapter() { |
|
|
|
@Override |
|
|
|
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
|
|
|
|
vPaneDLG.setVisible(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vPane = new ValuePane(types); |
|
|
|
|
|
|
|
Window window = parent == null |
|
|
|
|
|
|
|
? DesignerContext.getDesignerFrame() |
|
|
|
|
|
|
|
: SwingUtilities.getWindowAncestor(parent); |
|
|
|
|
|
|
|
vPaneDLG = vPane.showSmallWindow(window, new DialogActionAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void doOk() { |
|
|
|
public void doOk() { |
|
|
|
fireEditingStopped(); // Make the renderer
|
|
|
|
fireEditingStopped(); // Make the renderer
|
|
|
@ -912,7 +888,18 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> { |
|
|
|
public void doCancel() { |
|
|
|
public void doCancel() { |
|
|
|
fireEditingCanceled(); |
|
|
|
fireEditingCanceled(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
textLabel.addMouseListener(new MouseAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
|
|
|
|
Window window = e.getComponent() == null |
|
|
|
|
|
|
|
? DesignerContext.getDesignerFrame() |
|
|
|
|
|
|
|
: SwingUtilities.getWindowAncestor(e.getComponent()); |
|
|
|
|
|
|
|
vPane.showSmallWindow(window, adapter) |
|
|
|
|
|
|
|
.setVisible(true); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
vPane = new ValuePane(types); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|