Search in sources :

Example 11 with AsyncProcessIcon

use of com.intellij.util.ui.AsyncProcessIcon in project android by JetBrains.

the class AndroidThemePreviewPanel method createProgressPanel.

private void createProgressPanel() {
    myProgressIcon = new AsyncProcessIcon("Indexing");
    Disposer.register(this, myProgressIcon);
    JLabel progressMessage = new JLabel("Waiting for indexing...");
    JPanel progressBlock = new JPanel() {

        @Override
        public Dimension getMaximumSize() {
            // Necessary to vertically center it inside a Box.
            return super.getPreferredSize();
        }
    };
    progressBlock.add(myProgressIcon);
    progressBlock.add(progressMessage);
    progressBlock.setOpaque(false);
    myProgressPanel = new Box(BoxLayout.PAGE_AXIS);
    myProgressPanel.add(Box.createVerticalGlue());
    myProgressPanel.add(progressBlock);
    myProgressPanel.add(Box.createVerticalGlue());
    myProgressPanel.setOpaque(false);
}
Also used : AsyncProcessIcon(com.intellij.util.ui.AsyncProcessIcon)

Example 12 with AsyncProcessIcon

use of com.intellij.util.ui.AsyncProcessIcon in project android by JetBrains.

the class ToolComponentsPanel method createUIComponents.

private void createUIComponents() {
    myToolsLoadingIcon = new AsyncProcessIcon("Loading...");
    myToolsSummaryRootNode = new RootNode();
    myToolsDetailsRootNode = new RootNode();
    UpdaterTreeNode.Renderer renderer = new SummaryTreeNode.Renderer();
    ColumnInfo[] toolsSummaryColumns = new ColumnInfo[] { new DownloadStatusColumnInfo(), new TreeColumnInfo("Name"), new VersionColumnInfo(), new StatusColumnInfo() };
    myToolsSummaryTable = new TreeTableView(new ListTreeTableModelOnColumns(myToolsSummaryRootNode, toolsSummaryColumns));
    SdkUpdaterConfigPanel.setTreeTableProperties(myToolsSummaryTable, renderer, myModificationListener);
    ColumnInfo[] toolsDetailColumns = new ColumnInfo[] { new DownloadStatusColumnInfo(), new TreeColumnInfo("Name"), new VersionColumnInfo(), new StatusColumnInfo() };
    myToolsDetailTable = new TreeTableView(new ListTreeTableModelOnColumns(myToolsDetailsRootNode, toolsDetailColumns));
    SdkUpdaterConfigPanel.setTreeTableProperties(myToolsDetailTable, renderer, myModificationListener);
}
Also used : ListTreeTableModelOnColumns(com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns) AsyncProcessIcon(com.intellij.util.ui.AsyncProcessIcon) ColumnInfo(com.intellij.util.ui.ColumnInfo) TreeColumnInfo(com.intellij.ui.treeStructure.treetable.TreeColumnInfo) TreeTableView(com.intellij.ui.dualView.TreeTableView) TreeColumnInfo(com.intellij.ui.treeStructure.treetable.TreeColumnInfo)

Example 13 with AsyncProcessIcon

use of com.intellij.util.ui.AsyncProcessIcon in project android by JetBrains.

the class PlatformComponentsPanel method createUIComponents.

private void createUIComponents() {
    UpdaterTreeNode.Renderer renderer = new SummaryTreeNode.Renderer();
    myPlatformLoadingIcon = new AsyncProcessIcon("Loading...");
    myPlatformSummaryRootNode = new RootNode();
    myPlatformDetailsRootNode = new RootNode();
    ColumnInfo[] platformSummaryColumns = new ColumnInfo[] { new DownloadStatusColumnInfo(), new TreeColumnInfo("Name"), new ApiLevelColumnInfo(), new RevisionColumnInfo(), new StatusColumnInfo() };
    myPlatformSummaryTable = new TreeTableView(new ListTreeTableModelOnColumns(myPlatformSummaryRootNode, platformSummaryColumns));
    SdkUpdaterConfigPanel.setTreeTableProperties(myPlatformSummaryTable, renderer, myModificationListener);
    ColumnInfo[] platformDetailColumns = new ColumnInfo[] { new DownloadStatusColumnInfo(), new TreeColumnInfo("Name"), new ApiLevelColumnInfo(), new RevisionColumnInfo(), new StatusColumnInfo() };
    myPlatformDetailTable = new TreeTableView(new ListTreeTableModelOnColumns(myPlatformDetailsRootNode, platformDetailColumns));
    SdkUpdaterConfigPanel.setTreeTableProperties(myPlatformDetailTable, renderer, myModificationListener);
}
Also used : ListTreeTableModelOnColumns(com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns) AsyncProcessIcon(com.intellij.util.ui.AsyncProcessIcon) ColumnInfo(com.intellij.util.ui.ColumnInfo) TreeColumnInfo(com.intellij.ui.treeStructure.treetable.TreeColumnInfo) TreeTableView(com.intellij.ui.dualView.TreeTableView) TreeColumnInfo(com.intellij.ui.treeStructure.treetable.TreeColumnInfo)

Example 14 with AsyncProcessIcon

use of com.intellij.util.ui.AsyncProcessIcon in project intellij-community by JetBrains.

the class MavenRepositoriesConfigurable method reset.

public void reset() {
    myModel.removeAll();
    myModel.add(MavenRepositoryServicesManager.getInstance().getUrls());
    myIndicesTable.setModel(new MyTableModel(myManager.getIndices()));
    myIndicesTable.getColumnModel().getColumn(0).setPreferredWidth(400);
    myIndicesTable.getColumnModel().getColumn(1).setPreferredWidth(50);
    myIndicesTable.getColumnModel().getColumn(2).setPreferredWidth(50);
    myIndicesTable.getColumnModel().getColumn(3).setPreferredWidth(20);
    myUpdatingIcon = new AsyncProcessIcon(IndicesBundle.message("maven.indices.updating"));
    myUpdatingIcon.resume();
    myTimerListener = new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            myIndicesTable.repaint();
        }
    };
    myRepaintTimer = UIUtil.createNamedTimer("Maven repaint", AsyncProcessIcon.CYCLE_LENGTH / AsyncProcessIcon.COUNT, myTimerListener);
    myRepaintTimer.start();
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) AsyncProcessIcon(com.intellij.util.ui.AsyncProcessIcon)

Example 15 with AsyncProcessIcon

use of com.intellij.util.ui.AsyncProcessIcon in project intellij-community by JetBrains.

the class DesignerEditorPanel method createProgressPanel.

private void createProgressPanel() {
    myProgressIcon = new AsyncProcessIcon("Designer progress");
    myProgressMessage = new JLabel();
    JPanel progressBlock = new JPanel();
    progressBlock.add(myProgressIcon);
    progressBlock.add(myProgressMessage);
    progressBlock.setBorder(IdeBorderFactory.createRoundedBorder());
    myProgressPanel = new JPanel(new GridBagLayout());
    myProgressPanel.add(progressBlock, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    myProgressPanel.setOpaque(false);
}
Also used : AsyncProcessIcon(com.intellij.util.ui.AsyncProcessIcon)

Aggregations

AsyncProcessIcon (com.intellij.util.ui.AsyncProcessIcon)16 NotNull (org.jetbrains.annotations.NotNull)3 AllIcons (com.intellij.icons.AllIcons)2 Disposer (com.intellij.openapi.util.Disposer)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 com.intellij.ui (com.intellij.ui)2 TreeTableView (com.intellij.ui.dualView.TreeTableView)2 ListTreeTableModelOnColumns (com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns)2 TreeColumnInfo (com.intellij.ui.treeStructure.treetable.TreeColumnInfo)2 ColumnInfo (com.intellij.util.ui.ColumnInfo)2 List (java.util.List)2 javax.swing (javax.swing)2 Nullable (org.jetbrains.annotations.Nullable)2 SdkConstants (com.android.SdkConstants)1 ColumnTreeBuilder (com.android.tools.adtui.common.ColumnTreeBuilder)1 EdtExecutor (com.android.tools.idea.ddms.EdtExecutor)1 FutureCallback (com.google.common.util.concurrent.FutureCallback)1 Futures (com.google.common.util.concurrent.Futures)1 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)1 TargetElementUtil (com.intellij.codeInsight.TargetElementUtil)1