mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
view and download counter added
This commit is contained in:
@@ -34,7 +34,7 @@ public enum IconLoader {
|
||||
"id_card_edit.png"), KeyEdit("key_edit.png"), Find("find.png"), Dashboard("dashboard.png"), DataFind(
|
||||
"data_find.png"), CloudDownload("cloud-download.png"), NavLeftBlue("nav_left_blue.png"), NavRightBlue(
|
||||
"nav_right_blue.png"), MissingImage("missing_image.png"), CloudBg("cloud_bg.png"), CloudBig("cloud_big.png"), CloudWait(
|
||||
"cloud_wait.png"), Spinning("spinning.gif"), Megaphone("megaphone.png");
|
||||
"cloud_wait.png"), Spinning("spinning.gif"), Megaphone("megaphone.png"), Download("download.png"), Eye("eye.png");
|
||||
|
||||
protected String name;
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 852 B |
Binary file not shown.
|
After Width: | Height: | Size: 789 B |
+21
-7
@@ -101,7 +101,7 @@ public class ResultsScrollPanel extends JScrollPane {
|
||||
gbc.fill = GridBagConstraints.BOTH;
|
||||
gbc.weightx = 100;
|
||||
gbc.weighty = 100;
|
||||
gbc.gridwidth = 2;
|
||||
gbc.gridwidth = 4;
|
||||
resultsPanel.add(getLoadMoreLabel(), gbc);
|
||||
|
||||
gbc.gridx = 2;
|
||||
@@ -179,6 +179,13 @@ public class ResultsScrollPanel extends JScrollPane {
|
||||
descriptionArea.setEnabled(false);
|
||||
// descriptionArea.setDisabledTextColor(descriptionArea.getSelectionColor());
|
||||
|
||||
JLabel viewLabel =
|
||||
new JLabel(Integer.toString(project.getViewCount()), IconLoader.Eye.getIcon(), SwingConstants.LEFT);
|
||||
viewLabel.setToolTipText("View count");
|
||||
JLabel downloadLabel =
|
||||
new JLabel(Integer.toString(project.getDownloadCount()), IconLoader.Download.getIcon(), SwingConstants.LEFT);
|
||||
downloadLabel.setToolTipText("Download count");
|
||||
|
||||
JLabel categoryLabel = new JLabel("<html>Category: <b>" + project.getCategory() + "</b></html>");
|
||||
JLabel authorLabel = new JLabel("<html>Author: <b>" + project.getOwner() + "</b></html>");
|
||||
JLabel updatedLabel = new JLabel("<html>Last updated: <b>" + project.getUpdated() + "</b></html>");
|
||||
@@ -260,30 +267,37 @@ public class ResultsScrollPanel extends JScrollPane {
|
||||
getResultsPanel().add(thumbnailLabel, gbc);
|
||||
|
||||
gbc.gridheight = 1;
|
||||
gbc.gridx = 1;
|
||||
gbc.weightx = 1;
|
||||
gbc.gridx++;
|
||||
gbc.weightx = 1000;
|
||||
gbc.insets = new Insets(2, 6, 2, 2);
|
||||
getResultsPanel().add(nameLabel, gbc);
|
||||
|
||||
gbc.gridx++;
|
||||
gbc.weightx = 0;
|
||||
getResultsPanel().add(viewLabel, gbc);
|
||||
|
||||
gbc.gridx++;
|
||||
getResultsPanel().add(downloadLabel, gbc);
|
||||
|
||||
gbc.gridy++;
|
||||
gbc.gridx = 1;
|
||||
gbc.weighty = 1;
|
||||
gbc.weightx = 1;
|
||||
gbc.gridwidth = 2;
|
||||
gbc.gridwidth = 4;
|
||||
gbc.anchor = GridBagConstraints.NORTHWEST;
|
||||
gbc.fill = GridBagConstraints.BOTH;
|
||||
gbc.insets = new Insets(2, 6, 2, 2);
|
||||
getResultsPanel().add(descriptionArea, gbc);
|
||||
|
||||
gbc.gridy++;
|
||||
gbc.gridx = 1;
|
||||
gbc.gridwidth = 1;
|
||||
gbc.fill = GridBagConstraints.NONE;
|
||||
gbc.weighty = 0;
|
||||
getResultsPanel().add(categoryLabel, gbc);
|
||||
|
||||
gbc.gridx = 2;
|
||||
gbc.gridx++;
|
||||
gbc.gridheight = 3;
|
||||
gbc.gridwidth = 2;
|
||||
gbc.insets = new Insets(2, 2, 2, 2);
|
||||
gbc.anchor = GridBagConstraints.SOUTHEAST;
|
||||
getResultsPanel().add(downloadButton, gbc);
|
||||
@@ -300,7 +314,7 @@ public class ResultsScrollPanel extends JScrollPane {
|
||||
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy++;
|
||||
gbc.gridwidth = 3;
|
||||
gbc.gridwidth = 5;
|
||||
gbc.fill = GridBagConstraints.HORIZONTAL;
|
||||
gbc.weightx = 1;
|
||||
gbc.insets = new Insets(2, 2, 2, 2);
|
||||
|
||||
Reference in New Issue
Block a user