Examples of ACSElement


Examples of org.apache.tools.ant.gui.acs.ACSElement

        AntAction antAction = getContext().getActions().getAction(cmdStr);
        if (antAction == null) {
            return;
        }
       
        ACSElement e = vals[vals.length - 1];
       
        // Should we prompt the user use the element type?
        if (antAction.getName().equals(name)) {
           
            // Display the dialog box.
            ACSIntrospectedElement dtde = (ACSIntrospectedElement) e;
            NewElementDlg dlg = new NewElementDlg(
            getContext().getParentFrame(), true);
            dlg.setLists(
            dtde.getPossibleChildren(ACSIntrospectedElement.TASK_ELEMENTS),
            dtde.getPossibleChildren(ACSIntrospectedElement.TYPE_ELEMENTS) );
            dlg.pack();
            WindowUtils.centerWindow(dlg);
            dlg.setTitle("Select the new element type");
            dlg.setVisible(true);
           
            // Get the element type
            if (dlg.getCancel()) {
                name = "";
            } else {
                name = dlg.getElementName();
            }
        }
       
        if (name.length() > 0) {
            // Create the new element
            ACSElement retval =
            ACSFactory.getInstance().createElement(e, name);
            getContext().getEventBus().postEvent(
            new NewBaseElementEvent(getContext(),  retval));
        } else {
            // Request a refresh so the popup menu is removed
View Full Code Here

Examples of org.apache.tools.ant.gui.acs.ACSElement

                _tree.validate();
            }
            else if(event instanceof NewElementEvent &&
                    (event instanceof NewProjectEvent == false) &&
                    model != null) {
                ACSElement element = ((NewElementEvent)event).getNewElement();
                model.fireNodeAdded(element);
                TreePath path = new TreePath(model.getPathToRoot(element));
                _selections.setSelectionPath(path);
                _tree.scrollPathToVisible(path);
            }
            else if(event instanceof DeleteElementEvent && model != null) {
                ACSElement element = ((DeleteElementEvent)event).getDeletedElement();
                model.fireNodeDeleted(element);
                _tree.updateUI();
           }
            else {
                ACSProjectElement project = null;
View Full Code Here

Examples of org.apache.tools.ant.gui.acs.ACSElement

        }

        if(items != null && items.length > 0) {
            // The last selection element is the the one the
            // user most recently selected.
            ACSElement item = items[items.length - 1];

            try {
                BeanInfo info = Introspector.getBeanInfo(item.getClass());
                _customizer = (Customizer) info.getBeanDescriptor().
                    getCustomizerClass().newInstance();
                _customizer.setObject(item);
                _container.add(BorderLayout.CENTER, (Component) _customizer);
                _customizer.addPropertyChangeListener(_forwarder);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.