Package javax.swing

Examples of javax.swing.JTextField


            JPanel widthPanel = new JPanel();
            widthPanel.setLayout(new GridLayout(0, 1));

            JLabel widthLabel = new JLabel("Line Width");
            widthField = new JTextField(Float.toString(basicStroke.getLineWidth()), 4);
            widthField.setToolTipText("Enter pixel width of line.");
            widthPanel.add(widthLabel);
            widthPanel.add(widthField);

            JPanel mlPanel = new JPanel();
            mlPanel.setLayout(new GridLayout(0, 1));

            JLabel miterLimitLabel = new JLabel("Miter Limit");
            miterLimitField = new JTextField(Float.toString(basicStroke.getMiterLimit()), 4);
            miterLimitField.setToolTipText("Min angle for corner decorations.");

            mlPanel.add(miterLimitLabel);
            mlPanel.add(miterLimitField);

            JPanel dlPanel = new JPanel();
            dlPanel.setLayout(new FlowLayout());

            JLabel dashLabel = new JLabel("Dash Pattern");
//            float[] da = basicStroke.getDashArray();
//            String dashArrayString = dashArrayToString(da);

            dashField = new JTextField(dashArrayToString(basicStroke.getDashArray()), 15);
            dashField.setToolTipText("Number of pixels on off on ...");
            dlPanel.add(dashLabel);
            dlPanel.add(dashField);

            JPanel dpPanel = new JPanel();
            dpPanel.setLayout(new GridLayout(0, 1));

            JLabel dashPhaseLabel = new JLabel("Dash Phase");
            dashPhaseField = new JTextField(Float.toString(basicStroke.getDashPhase()), 4);
            dashPhaseField.setToolTipText("Phase to start dash array.");
            dpPanel.add(dashPhaseLabel);
            dpPanel.add(dashPhaseField);

            JPanel textFieldPanel = new JPanel();
View Full Code Here


        columnEnabled.setMinWidth(30);
        columnEnabled.setCellRenderer(CheckBoxTableCellRenderer.getInstance());
        columnEnabled.setHeaderValue("");
       
        TableColumn tcDescription = tblFiles.getColumnModel().getColumn(1);
        JTextField textField = ComponentFactory.getTextFieldDisabled();
        tcDescription.setCellEditor(new DefaultCellEditor(textField));
        tcDescription.setHeaderValue(DcResources.getText("lblFile"));

        tblFiles.applyHeaders();
       
View Full Code Here

     * Returns the selected Font (with the chosen size, thickness).
     * Unless the user has chosen otherwise, Arial font size 11 is returned. 
     */   
    @Override
    public Font getFont() {
      Font font = new JTextField().getFont();
        if (comboFontName.getSelectedIndex() != -1) {
            String fontName = comboFontName.getSelectedItem().toString();
           
            int fontSize = 11;
            try {
View Full Code Here

    private void setSampleText() {
        textField.setFont(getFont());
    }
   
    private void applySystemFont() {
        Font font = new JTextField().getFont();
        setValue(new Font(font.getName(), font.getSize(), Font.PLAIN));
    }
View Full Code Here

        //**********************************************************
        JPanel panelPreview = new JPanel();
       
        table.setColumnCount(3);
        TableColumn tcDescription = table.getColumnModel().getColumn(0);
        JTextField textField = ComponentFactory.getTextFieldDisabled();
        tcDescription.setCellEditor(new DefaultCellEditor(textField));
        tcDescription.setHeaderValue(DcModules.get(module).getObjectName());

        TableColumn tcOldFilename = table.getColumnModel().getColumn(1);
        textField = ComponentFactory.getTextFieldDisabled();
View Full Code Here

            TableColumn c = table.getColumnModel().getColumn(6);
            table.removeColumn(c);

            c = table.getColumnModel().getColumn(0);
            JTextField textField = ComponentFactory.getTextFieldDisabled();
            c.setCellEditor(new DefaultCellEditor(textField));
            c.setHeaderValue(DcResources.getText("lblField"));

            c = table.getColumnModel().getColumn(1);
            c.setCellEditor(new DefaultCellEditor(ComponentFactory.getNumberField()));
View Full Code Here

        panel.setLayout(Layout.getGBL());

        table.setColumnCount(4);

        TableColumn cField = table.getColumnModel().getColumn(0);
        JTextField textField = new JTextField();
        textField.setEditable(false);
        textField.setEnabled(false);
        textField.setFont(ComponentFactory.getSystemFont());
        textField.setForeground(ComponentFactory.getDisabledColor());
        cField.setCellEditor(new DefaultCellEditor(textField));

        TableColumn columnEnabled = table.getColumnModel().getColumn(1);
        columnEnabled.setCellEditor(new DefaultCellEditor(new JCheckBox()));
        columnEnabled.setCellRenderer(CheckBoxTableCellRenderer.getInstance());
View Full Code Here

            c = table.getColumnModel().getColumn(_COL_FIELD);
            table.removeColumn(c);

            c = table.getColumnModel().getColumn(_COL_ORIG_LABEL);
            JTextField textField = ComponentFactory.getTextFieldDisabled();
            c.setCellEditor(new DefaultCellEditor(textField));
            c.setHeaderValue(DcResources.getText("lblOriginalLabel"));

            c = table.getColumnModel().getColumn(_COL_CUSTOM_LABEL);
            DcShortTextField textName = ComponentFactory.getShortTextField(20);
View Full Code Here

    }   
   
    private void buildDialog() {
        getContentPane().setLayout(Layout.getGBL());
       
        JTextField txtFilter = ComponentFactory.getShortTextField(255);
        txtFilter.addKeyListener(this);

        list = new DcObjectList(DcObjectList._LISTING, false, true);
        list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        list.addMouseListener(this);
View Full Code Here

    }   
   
    private void build() {
        setLayout(Layout.getGBL());
       
        JTextField txtFilter = ComponentFactory.getShortTextField(255);
        txtFilter.addKeyListener(this);

        listLeft = new DcFieldList();
        listLeft.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        listLeft.addMouseListener(new ListMouseListener(ListMouseListener._RIGHT));
View Full Code Here

TOP

Related Classes of javax.swing.JTextField

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.