Package com.nexirius.framework.datamodel

Examples of com.nexirius.framework.datamodel.DataModelCommandVector


    public void update() {
        super.update();

        // eventually add the buttons for the methods
        if (getLayout() == null && getDataModel().hasMethods()) {
            DataModelCommandVector v = getDataModel().getMethods();
/*
      ArrayPanel button_panel = new ArrayPanel(true);

      for (DataModelCommand m = v.firstItem(); m != null; m = v.nextItem()) {
        try {
View Full Code Here


    public JComponent createJComponent(ViewerFactory factory) {
        JPanel buttonPanel = new JPanel(new GridBagLayout());
        JComponent button = null;
        DataModelCommand command;
        DataViewer buttonViewer;
        DataModelCommandVector commandVector = popupModel.getMethods();
        GridBagConstraints buttonConstr = new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 2, 0, 2), 0, 0);

        if (commandVector != null) {

            for (command = commandVector.firstItem(); command != null; command = commandVector.nextItem()) {
                try {
                    buttonViewer = factory.createDefaultEditor(command);
                    button = buttonViewer.getJComponent();
                    buttonPanel.add(button, buttonConstr);
                    ++buttonConstr.gridx;
View Full Code Here

    public JPopupMenu createPopupMenu(DataModel model) {
        JPopupMenu ret = null;

        if (model.hasMethods()) {
            DataModelCommandVector v = model.getMethods();

            ret = new JPopupMenu();
            int maxWidth = 200;

            for (DataModelCommand m = v.firstItem(); m != null; m = v.nextItem()) {
                try {
                    CommandViewer viewer = (CommandViewer)createDefaultViewer(m);
                    JMenuItem jMenuItem = viewer.createJMenuItem();

                    maxWidth = Math.max(jMenuItem.getPreferredSize().width, maxWidth);
View Full Code Here

        JComponent table = null;
        try {
            table = factory.createDefaultViewer(mainModel.getChild(EntryArrayModel.FIELD_NAME)).getJComponent();
            panel.add(table, BorderLayout.CENTER);

            DataModelCommandVector v = new DataModelCommandVector();

            v.add(mainModel.getMethod(MainModel.COMMAND_ADD));
            v.add(mainModel.getMethod(MainModel.COMMAND_EDIT));
            v.add(mainModel.getMethod(MainModel.COMMAND_DELETE));
            v.add(mainModel.getMethod(MainModel.COMMAND_DUPLICATE));

            panel.add(StructEditor.createButtonPanel(factory, v, true), BorderLayout.SOUTH);

        } catch (Exception e) {
            e.printStackTrace()//TODO
View Full Code Here

TOP

Related Classes of com.nexirius.framework.datamodel.DataModelCommandVector

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.