Example usage for javax.swing.plaf DimensionUIResource DimensionUIResource

List of usage examples for javax.swing.plaf DimensionUIResource DimensionUIResource

Introduction

In this page you can find the example usage for javax.swing.plaf DimensionUIResource DimensionUIResource.

Prototype

public DimensionUIResource(int width, int height) 

Source Link

Document

Constructs a DimensionUIResource .

Usage

From source file:it.unibas.spicygui.vista.BestMappingsTopComponent.java

private void initComponent(Image imageNumber) {

    setName(NbBundle.getMessage(Costanti.class, Costanti.VIEW_BEST_MAPPINGS_TOP_COMPONENT));
    setToolTipText(NbBundle.getMessage(Costanti.class, Costanti.VIEW_BEST_MAPPINGS_TOP_COMPONENT_TOOLTIP));

    Image imageDefault = ImageUtilities.loadImage(Costanti.ICONA_VIEW_BEST_MAPPINGS, true);
    this.setIcon(ImageUtilities.mergeImages(imageDefault, imageNumber, Scenario.X_OFFSET_IMAGE_NUMBER,
            Scenario.Y_OFFSET_IMAGE_NUMBER));

    messageLabel = new JTextArea();
    messageLabel.setRows(2);//  w  ww  . j  a va  2s.c o  m
    messageLabel.setEditable(false);
    messageLabel.setBackground(this.getBackground());
    tabellaBestMappings = new JTable();
    jScrollPane = new JScrollPane();
    jScrollPane.setPreferredSize(new DimensionUIResource(150, this.getHeight()));
    this.setPreferredSize(new Dimension(150, this.getHeight()));
    this.setLayout(new BorderLayout());
    this.add(messageLabel, BorderLayout.NORTH);
    this.add(jScrollPane, BorderLayout.CENTER);
    addSelectionListener();
}

From source file:it.unibas.spicygui.vista.RankedTransformationsTopComponent.java

private void initComponent() {
    messageLabel = new JTextArea();
    messageLabel.setRows(2);/*from   w ww  .  j ava2s .  c o  m*/
    messageLabel.setEditable(false);
    messageLabel.setBackground(this.getBackground());
    tabellaRankedTransformations = new JTable();
    jScrollPane = new JScrollPane();
    jScrollPane.setPreferredSize(new DimensionUIResource(150, this.getHeight()));
    this.setPreferredSize(new Dimension(150, this.getHeight()));
    this.setLayout(new BorderLayout());
    this.add(messageLabel, BorderLayout.NORTH);
    this.add(jScrollPane, BorderLayout.CENTER);
    addSelectionListener();
}

From source file:it.unibas.spicygui.vista.ProjectTreeTopComponent.java

private void myInitComponents() {
    this.setLayout(new BorderLayout());
    this.scrollPane = new JScrollPane();
    scrollPane.setPreferredSize(new DimensionUIResource(100, this.getHeight()));
    this.setPreferredSize(new Dimension(100, this.getHeight()));
    this.jTree = new JTree(null, false);
    new TreeDragSource(jTree, DnDConstants.ACTION_COPY_OR_MOVE);
    this.jTree.setDragEnabled(true);
    //        new TreeDropTarget(tree);
    this.scrollPane.setViewportView(jTree);
    this.add(this.scrollPane, BorderLayout.CENTER);
}