Example usage for javax.swing.plaf.metal MetalIconFactory getInternalFrameCloseIcon

List of usage examples for javax.swing.plaf.metal MetalIconFactory getInternalFrameCloseIcon

Introduction

In this page you can find the example usage for javax.swing.plaf.metal MetalIconFactory getInternalFrameCloseIcon.

Prototype

public static Icon getInternalFrameCloseIcon(int size) 

Source Link

Document

Constructs a new instance of InternalFrameCloseIcon .

Usage

From source file:st.jigasoft.dbutil.view.DUReport.java

/**
 * // w w w .j a v a  2s.c o  m
 * @param i 1- fechar | 2 - normalizr | 3 fechar
 */
protected void stateReport(int i) {
    if (i == 1) {
        this.btWindowsLeft.setVisible(false);
        this.btWindowsBtRigth.setIcon(MetalIconFactory.getInternalFrameDefaultMenuIcon());
        this.panelCommands.setVisible(false);
        this.panelFuter.setVisible(false);
        this.separatorTabelaGrafico.setDividerLocation(60);
        this.table.setVisible(false);
        this.panelCuston.setVisible(false);
        this.state = StateReport.CLOSED;
        this.btWindowsBtRigth.setToolTipText("Restores table");
    } else if (i == 2) {
        this.separatorTabelaGrafico.setOneTouchExpandable(true);
        this.btWindowsLeft.setVisible(true);
        this.btWindowsLeft.setIcon(MetalIconFactory.getInternalFrameMaximizeIcon(5));
        this.btWindowsBtRigth.setIcon(MetalIconFactory.getInternalFrameCloseIcon(5));
        this.separatorTabelaGrafico.getRightComponent().setVisible(true);
        this.panelCommands.setVisible(true);
        this.table.setVisible(true);
        this.panelFuter.setVisible(true);
        this.separatorTable.setVisible(true);
        this.panelCuston.setVisible(true);
        this.restoreDivider();
        this.state = StateReport.NORMAL;
        this.btWindowsBtRigth.setToolTipText("Close table");
        this.btWindowsLeft.setToolTipText("Maximize table");
    } else if (i == 3) {
        this.btWindowsLeft.setVisible(false);
        this.btWindowsBtRigth.setIcon(MetalIconFactory.getInternalFrameDefaultMenuIcon());
        this.separatorTabelaGrafico.getRightComponent().setVisible(false);
        this.defineDivider('W', separatorTabelaGrafico, 100);
        this.state = StateReport.MAXIMIZED;
        this.btWindowsBtRigth.setToolTipText("Restores table");
    }
    this.updateUI();
}