public RedisPanel(Project project, RedisClient redisClient, ServerConfiguration configuration, RedisDatabase database) { 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); }
public CouchbasePanel(Project project, CouchbaseClient couchbaseClient, ServerConfiguration configuration, CouchbaseDatabase database) { 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); }
public MongoPanel(Project project, final MongoClient mongoClient, final ServerConfiguration configuration, final MongoCollection mongoCollection) { this.project = project; this.mongoClient = mongoClient; this.mongoCollection = mongoCollection; this.configuration = configuration; errorPanel.setLayout(new BorderLayout()); queryPanel = new QueryPanel(project); queryPanel.setVisible(false); resultPanel = createResultPanel(project, new MongoDocumentOperations() { public DBObject getMongoDocument(Object _id) { return mongoClient.findMongoDocument(configuration, mongoCollection, _id); } public void updateMongoDocument(DBObject mongoDocument) { mongoClient.update(configuration, mongoCollection, mongoDocument); executeQuery(); } public void deleteMongoDocument(Object objectId) { mongoClient.delete(configuration, mongoCollection, 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(); }
@Override public void setCursor(Cursor cursor) { super.setCursor(cursor); Component layeredPane = UIUtil.findParentByCondition(this, component -> component instanceof LoadingDecorator.CursorAware); if (layeredPane != null) { layeredPane.setCursor(cursor); } }