Search in sources :

Example 1 with QualifierView

use of com.ramussoft.gui.qualifier.QualifierView in project ramus by Vitaliy-Yakovchuk.

the class SelectRowPanel method createComponents.

private void createComponents() {
    if (framework == null) {
        throw new NullPointerException("framework equals to null");
    }
    splitPane.setRightComponent(new JPanel());
    qualifierView = new QualifierView(framework, dataPlugin.getEngine(), accessRules) {

        @Override
        protected void addListeners() {
            table.addSelectionListener(new SelectionListener() {

                @Override
                public void changeSelection(SelectionEvent event) {
                    deleteRightPanel();
                    createRightComponent();
                }
            });
            table.setEditIfNullEvent(false);
            table.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "EditCell");
            table.getActionMap().put("EditCell", new AbstractAction() {

                /**
                 */
                private static final long serialVersionUID = 3229634866196074563L;

                @Override
                public void actionPerformed(java.awt.event.ActionEvent e) {
                    if ((table.getSelectedRow() >= 0) && (table.getSelectedColumn() >= 0))
                        editTableField();
                }
            });
        }
    };
    if (qualifierHideElements != null)
        qualifierView.setHideElements(qualifierHideElements);
    splitPane.setLeftComponent(qualifierView.createComponent());
    createRightComponent();
}
Also used : JPanel(javax.swing.JPanel) QualifierView(com.ramussoft.gui.qualifier.QualifierView) ActionEvent(com.ramussoft.gui.common.event.ActionEvent) SelectionEvent(com.ramussoft.gui.qualifier.table.event.SelectionEvent) AbstractAction(javax.swing.AbstractAction) SelectionListener(com.ramussoft.gui.qualifier.table.event.SelectionListener)

Example 2 with QualifierView

use of com.ramussoft.gui.qualifier.QualifierView in project ramus by Vitaliy-Yakovchuk.

the class SelectRowDialog method createComponents.

private void createComponents() {
    if (framework == null) {
        throw new NullPointerException("framework equals to null");
    }
    splitPane.setRightComponent(new JPanel());
    qualifierView = new QualifierView(framework, dataPlugin.getEngine(), accessRules) {

        @Override
        protected void addListeners() {
            table.addSelectionListener(new SelectionListener() {

                @Override
                public void changeSelection(SelectionEvent event) {
                    deleteRightPanel();
                    createRightComponent();
                }
            });
            table.setEditIfNullEvent(false);
            table.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "EditCell");
            table.getActionMap().put("EditCell", new AbstractAction() {

                /**
                 */
                private static final long serialVersionUID = 3229634866196074563L;

                @Override
                public void actionPerformed(java.awt.event.ActionEvent e) {
                    if ((table.getSelectedRow() >= 0) && (table.getSelectedColumn() >= 0))
                        editTableField();
                }
            });
        }
    };
    if (qualifierHideElements != null)
        qualifierView.setHideElements(qualifierHideElements);
    splitPane.setLeftComponent(qualifierView.createComponent());
    createRightComponent();
}
Also used : JPanel(javax.swing.JPanel) QualifierView(com.ramussoft.gui.qualifier.QualifierView) ActionEvent(com.ramussoft.gui.common.event.ActionEvent) SelectionEvent(com.ramussoft.gui.qualifier.table.event.SelectionEvent) AbstractAction(javax.swing.AbstractAction) SelectionListener(com.ramussoft.gui.qualifier.table.event.SelectionListener)

Aggregations

ActionEvent (com.ramussoft.gui.common.event.ActionEvent)2 QualifierView (com.ramussoft.gui.qualifier.QualifierView)2 SelectionEvent (com.ramussoft.gui.qualifier.table.event.SelectionEvent)2 SelectionListener (com.ramussoft.gui.qualifier.table.event.SelectionListener)2 AbstractAction (javax.swing.AbstractAction)2 JPanel (javax.swing.JPanel)2