Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.RadioList


        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

    public RadioListCellRenderer(RadioList radioList)
    {
        super();
        this.radioListOriginal = radioList;
        this.radioList = new RadioList(radioList.getOrientation(), radioList.getCaption().toString());
        ArrayFieldCellHelper.setUpCellRenderer(radioList, this.radioList); // CraigM: 28/03/2008
        this.radioList.setOrientation(radioList.getOrientation());
        this.radioList.setWrapSize(radioList.getWrapSize());
        this.radioList.setElementList(this.radioList.getElementList());
        this.radioList.setModel(radioList.getModel());
View Full Code Here

    int height = this.radioListOriginal.getMinimumSize().height;
    // TF:27/11/2009:Changed this to use the passed width
//    int width = this.radioListOriginal.getMinimumSize().width;

    if (this.radioListPainter == null) {
          this.radioListPainter = new RadioList(this.radioListOriginal.getOrientation(), this.radioListOriginal.getCaption().toString());
          this.radioListPainter.setWrapSize(this.radioListOriginal.getWrapSize());
          this.radioListPainter.setElementList(this.radioListOriginal.getElementList());
          this.radioListPainter.setModel(this.radioListOriginal.getModel());
    }
    this.radioListPainter.setForeground(this.radioListOriginal.getForeground());
View Full Code Here

    }

    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
        Component result = super.getTableCellEditorComponent(table, value, isSelected, row, column);
        if (result instanceof RadioList && isSelected) {
            RadioList rl = (RadioList)result;

            // CraigM:05/08/2008 - Java changes the colours for us, so don't do this.
//            if (isSelected)
//            {
//                rl.setForeground(table.getSelectionForeground());
//                rl.setBackground(table.getSelectionBackground());
//            }
//            else
//            {
//                rl.setBackground(table.getBackground()); //PM:27/9/07
//                rl.setForeground(table.getForeground()); //PM:27/9/07
//            }

            if (value instanceof Integer)
                ((RadioListModel)rl.getModel()).setIntegerValue(((Integer)value).intValue());
            else if (value instanceof IntegerData)
                // Cater for null values. CraigM. 07/08/2007
                if (((IntegerData)value).isNull()) {
                    rl.clearSelection();
                }
                else {
                    ((RadioListModel)rl.getModel()).setIntegerValue(((IntegerData)value).intValue());
                }
            else if (value instanceof TextData)
                ((RadioListModel)rl.getModel()).setTextValue((TextData)value);
            else if (value instanceof String)
                ((RadioListModel)rl.getModel()).setTextValue(new TextData((String)value));
            else
                ((RadioListModel)rl.getModel()).setObjectValue(value);
        }
        return result;
    }
View Full Code Here

              else if (newComponent instanceof PaletteList) {
                PaletteList list = (PaletteList)newComponent;
                topLevelManager.bindComponent(list, BindingManager.getDataObjectPath(origComponent), ElementList.get(list));
              }
              else if (newComponent instanceof RadioList) {
                RadioList list = (RadioList)newComponent;
                topLevelManager.bindComponent(list, BindingManager.getDataObjectPath(origComponent), ElementList.get(list));
              }
              else if (newComponent instanceof JScrollBar) {
                JScrollBar bar = (JScrollBar)newComponent;
                topLevelManager.bindComponent(bar, BindingManager.getDataObjectPath(origComponent),
View Full Code Here

    public static ScrollList newScrollList(){
        ScrollList jl = new ScrollList();
        return jl;
    }
    public static RadioList newRadioList(int xy, RadioListModel l, String caption){
        RadioList rl = new RadioList(xy, l, caption);
        l.setRadioList(rl);
        return rl;
    }
View Full Code Here

TOP

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

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.