mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
minor improvements
This commit is contained in:
+8
-1
@@ -7,7 +7,6 @@ import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -123,12 +122,20 @@ public class ResultsScrollPanel extends JScrollPane {
|
||||
if (projects == null || projects.isEmpty() && currentLocation == 0) {
|
||||
showNoMatches();
|
||||
} else {
|
||||
final Point old = getViewport().getViewPosition();
|
||||
LOG.info("Adding " + projects.size() + " projects to display.");
|
||||
for (int i = 0; i < projects.size(); i++) {
|
||||
addProjectToDisplay(projects.get(i));
|
||||
this.currentLocation++;
|
||||
}
|
||||
armed = true;
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
getViewport().setViewPosition(old);
|
||||
}
|
||||
});
|
||||
if (provider.hasMoreData()) {
|
||||
getLoadMoreLabel().setText("Querying the cloud for more results...");
|
||||
getLoadMoreLabel().setIcon(spinnerIcon);
|
||||
|
||||
+2
@@ -3,6 +3,7 @@ package org.diylc.swing.plugins.cloud.view.browser;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import java.awt.event.MouseEvent;
|
||||
@@ -41,6 +42,7 @@ public class SimpleCloudGlassPane extends JPanel implements MouseListener, KeyLi
|
||||
gbc.fill = GridBagConstraints.HORIZONTAL;
|
||||
gbc.weightx = 1;
|
||||
gbc.weighty = 1;
|
||||
gbc.insets = new Insets(0, 0, 80, 0);
|
||||
JLabel cloudLabel = new JLabel(IconLoader.CloudWait.getIcon());
|
||||
cloudLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
add(cloudLabel, gbc);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class StatusBar extends JPanel implements IPlugIn {
|
||||
@Override
|
||||
public void complete(String result) {
|
||||
if (result != null && result.length() > 0) {
|
||||
StatusBar.this.swingUI.showMessage(result, "Public Announcements", IView.INFORMATION_MESSAGE);
|
||||
StatusBar.this.swingUI.showMessage(result, "Public Announcement", IView.INFORMATION_MESSAGE);
|
||||
announcementProvider.dismissed();
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public class StatusBar extends JPanel implements IPlugIn {
|
||||
@Override
|
||||
public void complete(String result) {
|
||||
if (result != null && result.length() > 0) {
|
||||
swingUI.showMessage(result, "Public Announcements", IView.INFORMATION_MESSAGE);
|
||||
swingUI.showMessage(result, "Public Announcement", IView.INFORMATION_MESSAGE);
|
||||
announcementProvider.dismissed();
|
||||
} else
|
||||
swingUI.showMessage("No new public announcements available.", "Public Announcements",
|
||||
|
||||
Reference in New Issue
Block a user