Package java.awt

Examples of java.awt.Insets


        addComponent(getLabel(MusicAlbum._F_ARTISTS, false, field1Length), 1, 1);
        addComponent(getLabel(DcMediaObject._E_RATING, true, label2Length), 2, 1);
        addComponent(getRatingValueLabel(), 3, 1);       
       
        add(tracksField, Layout.getGBC( 0, 2, 4, 1, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 5, 5, 0), 0, 0));
        add(getPicturePanel(getPictures()), Layout.getGBC( 4, 0, 1, 3, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0));       
    }  
View Full Code Here


       
        descriptionField = ComponentFactory.getTextArea();
        descriptionField.setPreferredSize(new Dimension(600, 79));
        descriptionField.setText(getShortDescription((String) dco.getValue(Software._B_DESCRIPTION)));
        add(descriptionField, Layout.getGBC( 0, 3, 4, 1, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 5, 5, 0), 0, 0));
        add(getPicturePanel(getPictures()), Layout.getGBC( 4, 0, 1, 4, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0));       
    }
View Full Code Here

   
    @Override
    public abstract void build();
   
    protected void addComponent(JComponent component, int x, int y) {
        Insets insets = y == 0 && x == 0 ?
                            new Insets(5, 5, 0, 0) : y == 0
                                    new Insets(5, 0, 0, 0) : x == 0 ?
                                            new Insets(0, 5, 0, 0) :
                                                new Insets(0, 0, 0, 0);
        add(component, Layout.getGBC( x, y, 1, 1, 1.0, 1.0
           ,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, insets, 0, 0));         
    }
View Full Code Here

               
                label = ComponentFactory.getPictureField(true, false);
                label.setValue(image);
                panel.add(label, Layout.getGBC( 0, 0, 1, 1, 1.0, 1.0
                         ,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
                          new Insets(0, 0, 0, 0), 0, 0));
                break;
            }
        }
       
        return panel;
View Full Code Here

        int lastItem = list.getModel().getSize() - 1;
        if (lastItem < 0)
            return new Dimension(0, 0);

        Insets insets = list.getInsets();

        int width  = convertItemToX(columnsPerRow-1) + getItemWidth(lastItem) + insets.right;
        int height = convertItemToY(lastItem) + getItemHeight(lastItem) + insets.bottom;
        return new Dimension(width, height);
    }
View Full Code Here

     * @see #updateLayoutState
     */
    @Override
    protected int convertYToRow(int y0) {
        int nItems = list.getModel().getSize();
        Insets insets = list.getInsets();

        if (nItems <= 0)
            return -1;

        int rowCount = (nItems-1)/columnsPerRow+1;
View Full Code Here

        }
    }

    protected int convertXToColumn(int x0) {
        int nItems = list.getModel().getSize();
        Insets insets = list.getInsets();

        if (nItems <= 0)
            return -1;

        int columnCount = Math.min(nItems, columnsPerRow);
View Full Code Here

        return convertItemToY(row);
    }

    protected int convertItemToY(int index) {
        int nItems = list.getModel().getSize();
        Insets insets = list.getInsets();

        if ((nItems < 0) || (index >= nItems))
            return -1;

        int row = index / columnsPerRow;
View Full Code Here

        }
    }

    protected int convertItemToX(int index) {
        int nItems = list.getModel().getSize();
        Insets insets = list.getInsets();
   
        if ((nItems < 0) || (index >= nItems))
            return -1;
   
        int column = index % columnsPerRow;
View Full Code Here

        addComponent(getLabel(AudioCD._F_ARTISTS, false, field1Length), 1, 1);
        addComponent(getLabel(DcMediaObject._E_RATING, true, label2Length), 2, 1);
        addComponent(getRatingValueLabel(), 3, 1);       
       
        add(tracksField, Layout.getGBC( 0, 2, 4, 1, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 5, 5, 0), 0, 0));
        add(getPicturePanel(getPictures()), Layout.getGBC( 4, 0, 1, 3, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0));       
    }  
View Full Code Here

TOP

Related Classes of java.awt.Insets

Copyright © 2015 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.