Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.WindowUsageMap


        CloneHelper.cloneClientProperties(source, target);
        return target;
    }

    public static JTree cloneJTree(JTree source) {
        DisplayNode root = clone((DisplayNode) source.getModel().getRoot(), true);
        TreeViewModel dtm = new TreeViewModel(root);
        JTree target = new JTree(dtm);
        CloneHelper.cloneComponent(source, target, new String[] {"UI", // class javax.swing.plaf.TreeUI
                "UIClassID", // class java.lang.String
                "accessibleContext", // class javax.accessibility.AccessibleContext
View Full Code Here


        this.editor = new BorderedComboBoxEditor();
        this.setEditor(this.editor);
        this.setRenderer(new BorderedComboBoxRenderer());
        JTextComponent comp = (JTextComponent)this.editor.getEditorComponent();
        comp.setBackground(this.getBackground());
        comp.setDocument(new FixedLengthDocument(0));

        comp.addKeyListener(new ComboBoxKeyHandler());
    }
View Full Code Here

            }
            if (autoComplete) {
                editComponent.setDocument(new FillinManagementDocument(this, showDropdowns, listEntriesOnly, maxCharacters));
            }
            else {
                editComponent.setDocument(new FixedLengthDocument(maxCharacters));
            }
        }
    }
View Full Code Here

        target.setPreferredSize(source.isPreferredSizeSet() ? source.getPreferredSize() : null);
        target.setMinimumSize(source.isMinimumSizeSet() ? source.getMinimumSize() : null);
        target.setMaximumSize(source.isMaximumSizeSet() ? source.getMaximumSize() : null);
       
        if (source instanceof JComponent) {
          GridCell orig = GridCell.getExisting((JComponent)source);
          if (orig != null) {
            GridCell cell = GridCell.get((JComponent)target);
            cell.setWidthPolicy(orig.getWidthPolicy());
            cell.setHeightPolicy(orig.getHeightPolicy());
          }
          // TF:03/11/2008:We need to clone specific client properties too, otherwise some things won't work.
          ArrayFieldCellHelper.cloneComponentArrayParts((JComponent)source, (JComponent)target);
        }
    }
View Full Code Here

                    ((TitledBorder) border).setTitle("");
                }
            } else {
                if (pCaption != null) {
                    // TitledBorder tb = BorderFactory.createTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    TitledBorder tb = new GridTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    if (this.captionFont != null) {
                        tb.setTitleFont(this.captionFont);
                    }
                    setBorder(tb);
                }
            }
        } else {
          GridTitledBorder gridBorder;
            if (pCaption != null) {
              gridBorder = new GridTitledBorder(pCaption.toString());
            } else {
              gridBorder = new GridTitledBorder("");
            }
            if (this.captionFont != null) {
              gridBorder.setTitleFont(this.captionFont);
            }
            setBorder(gridBorder);
        }
    }
View Full Code Here

        return target;
    }

    public static JTree cloneJTree(JTree source) {
        DisplayNode root = clone((DisplayNode) source.getModel().getRoot(), true);
        TreeViewModel dtm = new TreeViewModel(root);
        JTree target = new JTree(dtm);
        CloneHelper.cloneComponent(source, target, new String[] {"UI", // class javax.swing.plaf.TreeUI
                "UIClassID", // class java.lang.String
                "accessibleContext", // class javax.accessibility.AccessibleContext
                "actionMap", // class javax.swing.ActionMap
View Full Code Here

     */
    public void setUsage(int usage) {
        this.qq_usage.setUsage(usage);
    }
    public void qq_setupWindowUsage() {
        this.qq_usage = new WindowUsageMap();
        this.qq_usage.add(getqq_OuterGrid(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.qq_usage.add(getqq_NewOrderGrid(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.qq_usage.add(getqq_ClientNameLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.qq_usage.add(getqq_NewOrderGrid_CustomerName(), Constants.FS_VIEWONLY, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.qq_usage.add(getqq_StockNameLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
View Full Code Here

        if (window == null) {
          return Constants.FS_UPDATE;
        }
      }
     
    WindowUsageMap winUsage = WindowUsage.getWindowUsageMap(window);
    return winUsage.getStateForUsage(comp, Usage);
    }
View Full Code Here

     * CraigM: 17/06/2008: Rewrote for new usage mapping.
     */
    public static void setForUsage(JFrame window, JComponent comp, int usage, int state) {
      // TF:08/01/2010:DET-95:Added support for usage maps off menu elements that may not be able to discover their
      // frames properly, such as invisible popup menus.
      WindowUsageMap winUsage  = WindowUsageMap.get(comp);
      if (winUsage == null) {
        winUsage = WindowUsage.getWindowUsageMap(window);
      }
    winUsage.setStateForUsage(comp, usage, state);

        // CraigM:18/08/2008 - If we're in the usage that is being set, explicitly set the usage of this component.
    if (winUsage.getUsage() == usage) {

      // Only need to do this if we were unable to get the window usage from the component.  This can happen with popup menus.
      if (UIutils.getWindowUsage(comp) != winUsage.getUsage()) {
        WidgetState.set(comp, state);
      }
    }
    }
View Full Code Here

    }

    public static void setForUsage(JComponent comp, int usage, int state) {
      // TF:08/01/2010:DET-95:Added support for usage maps off menu elements that may not be able to discover their
      // frames properly, such as invisible popup menus.
      WindowUsageMap winUsage  = WindowUsageMap.get(comp);
      if (winUsage != null) {
        winUsage.setStateForUsage(comp, usage, state);
      }
      //PM:12/5/08 added support for nested windows
      // TF:02/12/2009:DET-95:Changed this to use the declared from, not the frame for the window as the usage map is stored on the declared frame.
//      JFrame win = UIutils.getWindowForComponent(comp);
      JFrame win = UIutils.getDeclaredFrame(comp);
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.WindowUsageMap

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.