Package org.openquark.gems.client.valueentry

Examples of org.openquark.gems.client.valueentry.ValueEditorHierarchyManager


            editorValueGem.removeValueChangeListener(editorValueGemListener);
            editorValueGem = null;
            editorValueGemListener = null;
        }

        ValueEditorHierarchyManager vehm = tableTopExplorer.getValueEditorHierarchyManager();
       
        // Under some circumstances this method can be called twice.
        // Therefore only remove the value editor if it really is managed by the hierarchy manager.           
        if (vehm.getTopValueEditors().contains(editorComponent)) {
            vehm.removeValueEditor(editorComponent, commit);
        }
    }
View Full Code Here


     * @param node the tree node the panel is editing
     * @param valueEditor the panel to configure
     */
    private void setupValueEditor(DefaultMutableTreeNode node, ValueEditor valueEditor) {

        ValueEditorHierarchyManager valueEditorHierarchyManager = tableTopExplorer.getValueEditorHierarchyManager();
        valueEditorHierarchyManager.addTopValueEditor(valueEditor);

        // Make the panel as wide as the visible part of the tree.
        Dimension preferredSize = valueEditor.getPreferredSize();
        preferredSize.width = tree.getVisibleRect().width - tree.getPathBounds(new TreePath(node.getPath())).x - 50;
        valueEditor.setPreferredSize(preferredSize);
View Full Code Here

     * Get the ValueEditorHierarchyManager for editors in the explorer.
     * @return valueEditorHierarchyManager
     */
    public ValueEditorHierarchyManager getValueEditorHierarchyManager() {
        if (valueEditorHierarchyManager == null && explorerOwner.getValueEditorManager() != null) {
            valueEditorHierarchyManager = new ValueEditorHierarchyManager(explorerOwner.getValueEditorManager());

            // Set up the hierarchy so that hierarchy commit/cancel events close the top-level editor.
            valueEditorHierarchyManager.setHierarchyCommitCancelHandler(new ValueEditorHierarchyManager.HierarchyCommitCancelHandler() {
                public void handleHierarchyCommitCancel(boolean commit) {
                    if (commit) {
View Full Code Here

        ValueNodeBuilderHelper valueBuilderHelper = new ValueNodeBuilderHelper(perspective);
        ValueNodeBuilderHelper displayedGemBuilderHelper = new ValueNodeBuilderHelper(perspective);
       
        valueEditorManager = new ValueEditorManager(displayedGemBuilderHelper, getWorkspace(), typeColours, getTypeCheckInfo());
        displayedGemRunner = new DisplayedGemRunner(workspaceManager, this);
        tableTopEditorHierarchyManager = new ValueEditorHierarchyManager(valueEditorManager, getTableTopPanel());
        outputPanelHierarchyManager = new ValueEditorHierarchyManager(valueEditorManager, getLayeredPane());

        valueRunner.setValueNodeBuilderHelper(valueBuilderHelper);
        displayedGemRunner.setValueNodeBuilderHelper(displayedGemBuilderHelper);
        tableTop.getGemGraph().setValueNodeBuilderHelper(valueEditorManager.getValueNodeBuilderHelper());
       
View Full Code Here

        if (gemCutter == null) {
            throw new NullPointerException("Argument 'gemCutter' cannot be null.");
        }
        this.gemCutter = gemCutter;
       
        valueEditorHierarchyManager = new ValueEditorHierarchyManager(gemCutter.getValueEditorManager());
    }
View Full Code Here

     */
    private void commitActiveEntryPanels() {
       
        valueEditorHierarchyManager.commitHierarchy(true);

        ValueEditorHierarchyManager gemCutterHierarchyManager = gemCutter.getValueEditorHierarchyManager();
        gemCutterHierarchyManager.commitHierarchy(true);
       
        ValueEditorHierarchyManager explorerHierarchyManager = gemCutter.getTableTopExplorer().getValueEditorHierarchyManager();
        explorerHierarchyManager.commitHierarchy(true);
    }
View Full Code Here

            this.perspective = perspective;
            this.valueRunner = valueRunner;
            this.valueEditorManager = valueEditorManager;
//            this.valueEditorHierarchyManager = valueEditorHierarchyManager;
            this.valueEditorHierarchyManager = new ValueEditorHierarchyManager(valueEditorManager);
            this.typeChecker = typeChecker;

            setTitle(GeneratorMessages.getString("JDBCGF_CreateResultsetGemTitle"));

            getContentPane().setLayout(new BorderLayout());
View Full Code Here

         * @return the hierarchy manager used to instantiate value editors..
         */
        private ValueEditorHierarchyManager getValueEditorHierarchyManager() {
            // Lazily create a hierarchy manager if none yet exists.
            if (hierarchyManager == null) {
                hierarchyManager = new ValueEditorHierarchyManager(owner.getValueEditorManager());
               
                // Set up the hierarchy so that hierarchy commit/cancel events close the top-level editor.
                hierarchyManager.setHierarchyCommitCancelHandler(new ValueEditorHierarchyManager.HierarchyCommitCancelHandler() {
                    public void handleHierarchyCommitCancel(boolean commit) {
                        if (commit) {
View Full Code Here

         * Remove the given editor from the hierarchy.
         * @param editorToRemove the editor to remove.
         * @param commit true to commit on remove, false to cancel.
         */
        private void removeValueEditor(ValueEditor editorToRemove, boolean commit) {
            ValueEditorHierarchyManager vehm = getValueEditorHierarchyManager();
           
            // Under some circumstances this method can be called twice.
            // Therefore only remove the value editor if it really is managed by the hierarchy manager.           
            if (vehm.getTopValueEditors().contains(editorToRemove)) {
                vehm.removeValueEditor(editorToRemove, commit);
            }
        }
View Full Code Here

    ValueEntryPanel getValueEntryPanel(final ValueGem valueGem) {

        // Lazily create the value panel on demand.
        if (!valueGemPanelMap.containsKey(valueGem)) {
           
            final ValueEditorHierarchyManager valueEditorHierarchyManager = gemCutter.getValueEditorHierarchyManager();
            ValueEditorManager valueEditorManager = valueEditorHierarchyManager.getValueEditorManager();
            ValueNode valueNode = valueGem.getValueNode();
   
            // Create the value entry panel.
            final ValueEntryPanel valueEntryPanel =
                (ValueEntryPanel)valueEditorManager.getValueEditorDirector().getRootValueEditor(valueEditorHierarchyManager,
                                                                                                valueNode, null, 0, null);
           
            // Add it to the map.
            valueGemPanelMap.put(valueGem, valueEntryPanel);
           
            // add a listener to propagate changes in the value gem to the VEP.
            valueGem.addValueChangeListener(new ValueGemChangeListener() {
                public void valueChanged(ValueGemChangeEvent e) {
                    ValueGem valueGem = (ValueGem)e.getSource();
                    valueEditorHierarchyManager.collapseHierarchy(valueEntryPanel, false);
                    valueEntryPanel.changeOwnerValue(valueGem.getValueNode());
                    valueEntryPanel.setSize(valueEntryPanel.getPreferredSize());
                    valueEntryPanel.revalidate();
                }
            });
View Full Code Here

TOP

Related Classes of org.openquark.gems.client.valueentry.ValueEditorHierarchyManager

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.