Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.GridTitledBorder


        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

            }
          }
        } else {
          if ((caption != null) && (!(caption.length()==0))) {//PM:7 oct. 2008:performance improvement
            // CraigM:26/08/2008 - Fixed to set the border variable
            border = new GridTitledBorder(caption.toString());
            // panel.setBorder(BorderFactory.createTitledBorder(caption.toString()));
            panel.setBorder(border);
            Font titleFont = (Font)panel.getClientProperty("qq_CaptionFont");
            if (titleFont != null) {
              ((TitledBorder)border).setTitleFont(titleFont);
View Full Code Here

    }
  }
 
  private Border setCaptionInBorder(Border border, String caption){
    //        return BorderFactory.createTitledBorder(border, caption, TitledBorder.LEFT, TitledBorder.TOP);
    return new GridTitledBorder(border, caption, TitledBorder.LEFT, TitledBorder.TOP);
  }
View Full Code Here

            JComponent c = (JComponent)this._component;
            Border border = c.getBorder();
            if ((border == null) || (border instanceof EmptyBorder)) {
              // TF:18/09/2009:Corrected this to use a GridTitledBorder, which better understands
              // how to handle frame weights and frame colours
              GridTitledBorder gtb = new GridTitledBorder();
              gtb.setFrameWeight(Constants.W_NONE);
              gtb.setFrameColor(UIutils.forteToJavaColor(color));
              c.setBorder(gtb);
//                c.setBorder(new LineBorderWithColour(UIutils.forteToJavaColor(color)));
            }
            else if ((border != null) && (border instanceof GridTitledBorder)) {
                // TF:6/9/07:Added the functionality to use the GridTitledBorder for proper behaviour
                GridTitledBorder gridBorder = (GridTitledBorder)border;
                gridBorder.setFrameColor(UIutils.forteToJavaColor(color));
                c.repaint();
            }
            else if ((border != null) && (border instanceof TitledBorder))
            {
                TitledBorder titledBorder = (TitledBorder)border;
View Full Code Here

                break;
            }
            jc.setBorder(newBorder);
        } else {
            String caption = (String)jc.getClientProperty("qq_caption");
            GridTitledBorder gtb = new GridTitledBorder(null, caption);
            gtb.setFrameWeight(weight);
            jc.setBorder(gtb);
        }
    }
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

TOP

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

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.