Package com.subhajit.gui.beaneditor

Examples of com.subhajit.gui.beaneditor.AbstractViewControl


    }
    if (fieldEdited) {
      return field.get(bean);
    }

    AbstractViewControl editingPanel = AbstractViewControl.newInstance("",
        "caption", obj.getClass(), obj);

    JOptionPane op = new JOptionPane(editingPanel,
        JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);

    StringBuffer captionBuf = new StringBuffer().append(obj.getClass()
        .getName());
    JDialog dlg = op.createDialog(this, captionBuf.toString());
    dlg.setSize(250, 120);
    FrameUtils.centerDialog(dlg);
    op.setVisible(true);
    op.invalidate();
    dlg.setModal(true);
    dlg.setVisible(true);

    int selectedValue = ((Integer) op.getValue()).intValue();
    if (selectedValue == JOptionPane.OK_OPTION)
      return editingPanel.getValue();
    else
      return obj;
  }
View Full Code Here

TOP

Related Classes of com.subhajit.gui.beaneditor.AbstractViewControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.