List of usage examples for com.intellij.openapi.ui LoadingDecorator LoadingDecorator
public LoadingDecorator(JComponent content, @NotNull Disposable parent, int startDelayMs)
From source file:com.intellij.ui.components.JBLoadingPanel.java
License:Apache License
public JBLoadingPanel(@Nullable LayoutManager manager, @NotNull Disposable parent, int startDelayMs) { super(new BorderLayout()); myPanel = manager == null ? new JPanel() : new JPanel(manager); myPanel.setOpaque(false);//from ww w .j a va 2s . c o m myDecorator = new LoadingDecorator(myPanel, parent, startDelayMs) { @Override protected NonOpaquePanel customizeLoadingLayer(JPanel parent, JLabel text, AsyncProcessIcon icon) { final NonOpaquePanel panel = super.customizeLoadingLayer(parent, text, icon); customizeStatusText(text); return panel; } }; super.add(myDecorator.getComponent(), BorderLayout.CENTER); }
From source file:org.codinjutsu.tools.nosql.couchbase.view.CouchbasePanel.java
License:Apache License
public CouchbasePanel(Project project, CouchbaseClient couchbaseClient, ServerConfiguration configuration, CouchbaseDatabase database) {/*w w w. j a v a 2 s . c om*/ this.project = project; this.couchbaseClient = couchbaseClient; this.configuration = configuration; this.database = database; this.resultPanel = new JPanel(new BorderLayout()); loadingDecorator = new LoadingDecorator(resultPanel, this, 0); containerPanel.add(loadingDecorator.getComponent()); initToolbar(); setLayout(new BorderLayout()); add(mainPanel); }
From source file:org.codinjutsu.tools.nosql.mongo.view.MongoPanel.java
License:Apache License
public MongoPanel(Project project, final SingleMongoClient singleMongoClient, final ServerConfiguration configuration, final SingleMongoCollection singleMongoCollection) { this.project = project; this.singleMongoClient = singleMongoClient; this.singleMongoCollection = singleMongoCollection; this.configuration = configuration; errorPanel.setLayout(new BorderLayout()); queryPanel = new QueryPanel(project); queryPanel.setVisible(false);// ww w . ja v a 2s.c o m resultPanel = createResultPanel(project, new MongoDocumentOperations() { public Document getMongoDocument(Object _id) { return singleMongoClient.findMongoDocument(configuration, singleMongoCollection, _id); } public void updateMongoDocument(Document mongoDocument) { singleMongoClient.update(configuration, singleMongoCollection, mongoDocument); executeQuery(); } public void deleteMongoDocument(Object objectId) { singleMongoClient.delete(configuration, singleMongoCollection, objectId); executeQuery(); } }); loadingDecorator = new LoadingDecorator(resultPanel, this, 0); splitter.setOrientation(true); splitter.setProportion(0.2f); splitter.setSecondComponent(loadingDecorator.getComponent()); setLayout(new BorderLayout()); add(rootPanel); initToolBar(); }
From source file:org.codinjutsu.tools.nosql.redis.view.RedisPanel.java
License:Apache License
public RedisPanel(Project project, RedisClient redisClient, ServerConfiguration configuration, RedisDatabase database) {//from w w w . java 2 s . com this.project = project; this.redisClient = redisClient; this.configuration = configuration; this.database = database; this.resultPanel = new JPanel(new BorderLayout()); buildQueryToolBar(); loadingDecorator = new LoadingDecorator(resultPanel, this, 0); containerPanel.add(loadingDecorator.getComponent()); loadAndDisplayResults(getFilter(), this.groupData, this.groupSeparator); setLayout(new BorderLayout()); add(mainPanel); }