Example usage for javax.swing JInternalFrame updateUI

List of usage examples for javax.swing JInternalFrame updateUI

Introduction

In this page you can find the example usage for javax.swing JInternalFrame updateUI.

Prototype

public void updateUI() 

Source Link

Document

Notification from the UIManager that the look and feel has changed.

Usage

From source file:mondrian.gui.Workbench.java

/**
 * Updates the JdbcMetaData for each SchemaExplorer contained in each Schema
 * Frame currently opened based on the JDBC preferences entered.
 *///ww  w .ja v a2 s . c  o  m
private void resetWorkbench() {
    getNewJdbcMetadata();

    Iterator<JInternalFrame> theSchemaFrames = schemaWindowMap.keySet().iterator();
    while (theSchemaFrames.hasNext()) {
        JInternalFrame theSchemaFrame = theSchemaFrames.next();
        SchemaExplorer theSchemaExplorer = (SchemaExplorer) theSchemaFrame.getContentPane().getComponent(0);
        File theFile = theSchemaExplorer.getSchemaFile();
        checkSchemaFile(theFile);
        theSchemaExplorer.resetMetaData(jdbcMetaData);
        theSchemaExplorer.getTreeUpdater().update();
        theSchemaFrame.updateUI();
    }
    // EC: If the JDBC preferences entered then display a warning.
    displayWarningOnFailedConnection();

    for (JInternalFrame jdbcFrame : jdbcWindows) {
        JdbcExplorer explorer = (JdbcExplorer) jdbcFrame.getContentPane().getComponent(0);
        explorer.resetMetaData(jdbcMetaData);

        jdbcFrame.setTitle(getResourceConverter().getFormattedString("workbench.new.JDBCExplorer.title",
                "JDBC Explorer - {0} {1}", jdbcMetaData.getDatabaseProductName(),
                jdbcMetaData.getJdbcConnectionUrl()));

        explorer.getTreeUpdater().update();
        explorer.updateUI();
    }
}