Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.GridField$ColumnJustifyWeightFilter


        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

               
                // Check if has a Name and if not see if there is generated name
                String componentName = c.getName();
                if (!StringUtils.hasText(componentName)) {
          if (c instanceof GridField) {
            GridField gf = (GridField) c;
            componentName = gf.getGeneratedName();
          }
        }
               
                // TF:16/11/07:First do standard properties...
                stdProperties.add(new TableData("<html><b>Name</b></html>", componentName));
                stdProperties.add(new TableData("<html><b>Sizing</b></html>", ""));
                stdProperties.add(new TableData("  location", "[x="+ c.getX()+",y="+c.getY()+"]"));
                stdProperties.add(new TableData("  size", "[width="+ c.getWidth()+",height="+ c.getHeight()+"]"));
                stdProperties.add(new TableData("  minimumSize", c.isMinimumSizeSet() ? showDimension(c.getMinimumSize()): "<html><i>Not set</i></html>"));
                stdProperties.add(new TableData("  maximumSize", c.isMaximumSizeSet() ? showDimension(c.getMaximumSize()): "<html><i>Not set</i></html>"));
                stdProperties.add(new TableData("  preferredSize", c.isPreferredSizeSet() ? showDimension(c.getPreferredSize()): "<html><i>Not set</i></html>"));
                if (c instanceof JComponent) {
                    JComponent comp = (JComponent)c;
                    GridCell cell = GridCell.get(comp);
                    stdProperties.add(new TableData("<html><b>Layout Info</b></html>", ""));
                    stdProperties.add(new TableData("  cell", "[row="+ cell.getRow()+",column="+cell.getColumn()+"]"));
                    stdProperties.add(new TableData("  widthPolicy", cell.sizePolicyToString(cell.getWidthPolicy())));
                    if (cell.getWidthPolicy() == Constants.SP_TO_PARTNER) {
                      JComponent comp1 = LayoutManagerHelper.getWidthPartner(comp);
                      for (int i = 1; comp1 != null && comp1 != comp; i++) {
                            stdProperties.add(new TableData("      ["+i+"]", "  " + comp1.toString()));
                            comp1 = LayoutManagerHelper.getWidthPartner(comp1);
                      }
                    }
                    else if (cell.getWidthPolicy() == Constants.SP_TO_MATRIX_PARTNER && comp instanceof GridField) {
                      GridField partner = ((GridField)comp).getWidthMatrixPartner();
                      for (int i = 1; partner != null && partner != comp; i++) {
                            stdProperties.add(new TableData("      ["+i+"]", "  " + partner.toString()));
                            partner = partner.getWidthMatrixPartner();
                      }
                    }
                    stdProperties.add(new TableData("  heightPolicy", cell.sizePolicyToString(cell.getHeightPolicy())));
                    if (cell.getHeightPolicy() == Constants.SP_TO_PARTNER) {
                      JComponent comp1 = LayoutManagerHelper.getHeightPartner(comp);
                      for (int i = 1; comp1 != null && comp1 != comp; i++) {
                            stdProperties.add(new TableData("      ["+i+"]", "  " + comp1.toString()));
                            comp1 = LayoutManagerHelper.getHeightPartner(comp1);
                      }
                    }
                    else if (cell.getHeightPolicy() == Constants.SP_TO_MATRIX_PARTNER && comp instanceof GridField) {
                      GridField partner = ((GridField)comp).getHeightMatrixPartner();
                      for (int i = 1; partner != null && partner != comp; i++) {
                            stdProperties.add(new TableData("      ["+i+"]", "  " + partner.toString()));
                            partner = partner.getHeightMatrixPartner();
                      }
                    }
                    stdProperties.add(new TableData("  gravity", cell.gravityAsString()));
                    stdProperties.add(new TableData("  margins", "[t="+cell.getTopMargin()+
                                                                ",l="+cell.getLeftMargin()+
                                                                ",b="+cell.getBottomMargin()+
                                                                ",r="+cell.getRightMargin()+"]"))
                    if (comp.getParent() instanceof GridField) {
                        GridField gf = (GridField)comp.getParent();
                        stdProperties.add(new TableData("  rowWeight", ""+gf.getRowJustifyWeight(cell.getRow())));
                        stdProperties.add(new TableData("  columnWeight", ""+gf.getColumnJustifyWeight(cell.getColumn())));
                    }
                    if (comp instanceof GridField) {
                        StringBuilder buffer = new StringBuilder(50);
                        GridField gf = (GridField)comp;
                        int[] rowWeights = gf.getRowJustifyWeight();
                        buffer.append('[');
                        for (int i = 0; i < rowWeights.length; i++) {
                            if (i > 0) {
                                buffer.append(',');
                            }
                            buffer.append(rowWeights[i]);
                        }
                        buffer.append(']');
                        stdProperties.add(new TableData("  rowWeights", buffer.toString()));

                        buffer = new StringBuilder(50);
                        int[] colWeights = gf.getColumnJustifyWeight();
                        buffer.append('[');
                        for (int i = 0; i < colWeights.length; i++) {
                            if (i > 0) {
                                buffer.append(',');
                            }
View Full Code Here

     */
    protected boolean useScreenRow = true;

    public ArrayFieldCellRenderer(TableCellRenderer pRenderer) {
        this.defaultRenderer = pRenderer;
        this.panelWrapper = new GridField(); // CraigM:15/10/2008 - Switched from being a JPanel to a GridField.
        this.panelWrapper.setOpaque(false);
        this.panelWrapper.setLayout(new GridFieldLayout());
        this.panelWrapper.setHeightPolicy(Constants.SP_TO_PARENT);
        this.panelWrapper.setWidthPolicy(Constants.SP_TO_PARENT);
        this.panelWrapper.setCellGravity(Constants.CG_CENTER);
View Full Code Here

                }

                // If our container is a GridField, we can work out exactly which field to move to
                else if (cntr instanceof GridField) {
                    while (true) {
                        GridField gf = (GridField)cntr;
                        comp = gf.getComponentNeighbour(pComp, (pKeyEvent.getKeyCode() == KeyEvent.VK_UP));

                        // Keep going until we get nothing, a grid, or something that is focusable and enabled
                        while comp != null &&
                                comp instanceof GridField == false &&
                                (Enabled.is(comp) == false || Focusable.is(comp) == false)) {
                            comp = gf.getComponentNeighbour(comp, (pKeyEvent.getKeyCode() == KeyEvent.VK_UP));
                        }

                        // If our neighbour is a grid, recuse into it
                        if (comp instanceof GridField) {
                            pComp = null;
View Full Code Here

   * @param name
   *            Name of the GridField
   * @return The created GridField
   */
  public static GridField newGridField(String name) {
    GridField gf = new GridField(name);
    return gf;
  }
View Full Code Here

   *            Component Name. If true it is the generated name if false then
   *            the component name
   * @return The created GridField
   */
  public static GridField newGridField(String name, boolean generatedName) {
    GridField gf = new GridField(name, generatedName);
    return gf;
  }
View Full Code Here

   * @return The created GridField
   */
  public static GridField newGridField() {
    // TF:9/11/07:Refactored this method to initialise the state properly
    // for coded widgets, instead of declared widgets
    GridField gf = new GridField();
    WidgetState.set(gf, Constants.FS_UPDATE);
    return gf;
  }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.GridField$ColumnJustifyWeightFilter

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.