Search in sources :

Example 1 with ObjRelationshipTableModel

use of org.apache.cayenne.modeler.editor.ObjRelationshipTableModel in project cayenne by apache.

the class DbRelationshipPathComboBoxEditor method initializeCombo.

@Override
protected void initializeCombo(CayenneTableModel model, int row, final JTable table) {
    super.initializeCombo(model, row, table);
    comboBoxPathChooser.setSelectedItem(((ObjRelationshipTableModel) model).getRelationship(row).getDbRelationshipPath());
    enterPressedCount = 0;
    comboBoxPathChooser.setToolTipText("To choose relationship press enter two times.To choose next relationship press dot.");
    JTextComponent textEditor = (JTextComponent) (comboBoxPathChooser).getEditor().getEditorComponent();
    textEditor.addFocusListener(this);
    savePath = this.model.getRelationship(row).getDbRelationshipPath();
}
Also used : ObjRelationshipTableModel(org.apache.cayenne.modeler.editor.ObjRelationshipTableModel) JTextComponent(javax.swing.text.JTextComponent)

Aggregations

JTextComponent (javax.swing.text.JTextComponent)1 ObjRelationshipTableModel (org.apache.cayenne.modeler.editor.ObjRelationshipTableModel)1