You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2015/05/26 18:22:05 UTC
svn commit: r1681790 [1/3] - in
/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main:
java/org/apache/chemistry/opencmis/workbench/
java/org/apache/chemistry/opencmis/workbench/details/
java/org/apache/chemistry/...
Author: fmui
Date: Tue May 26 16:22:03 2015
New Revision: 1681790
URL: http://svn.apache.org/r1681790
Log:
Workbench: new (scalable) icons
Added:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AbstractWorkbenchIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AddIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/BaseTypeIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/ChangeLogIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/CheckedOutIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/ConnectIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/ConsoleIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/CopyIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/CreateObjectIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/CreateTypeIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/DeleteTypeIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/DocumentIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/DownIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/FolderIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/InfoIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/ItemIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/LogIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/NewDocumentIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/NewFolderIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/NewItemIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/NewPolicyIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/NewRelationshipIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/NoIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/PolicyIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/PwcIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/QueryIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/RelationshipIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/RemoveIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/RepositoryInfoIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/SaveTypeIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/SecondaryIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/TckIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/TypeIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/TypesIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/UpIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/UpdateTypeIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/YesIcon.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/swing/BaseTypeLabel.java
Removed:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/add.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/changelog.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/checkedout.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/connect.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/console.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/deletetype.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/document.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/down.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/folder.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/info.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/item.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/log.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/newdocument.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/newfolder.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/newrelationship.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/newtype.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/no.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/paste.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/policy.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/pwc.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/query.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/relationship.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/remove.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/repository-info.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/savetype.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/tck.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/types.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/up.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/updatetype.png
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/images/yes.png
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AclEditorFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ChangeLogFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateItemDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreatePolicyDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/FolderTable.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/InfoDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LogFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/QueryFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/RepositoryInfoFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypeSplitPane.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypesFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/Workbench.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/ObjectPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/swing/InfoPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/swing/YesNoLabel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/META-INF/README-cmis-workbench.txt
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AclEditorFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AclEditorFrame.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AclEditorFrame.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AclEditorFrame.java Tue May 26 16:22:03 2015
@@ -62,6 +62,8 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlEntryImpl;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlPrincipalDataImpl;
+import org.apache.chemistry.opencmis.workbench.icons.AddIcon;
+import org.apache.chemistry.opencmis.workbench.icons.RemoveIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
public class AclEditorFrame extends JFrame {
@@ -69,7 +71,8 @@ public class AclEditorFrame extends JFra
private static final long serialVersionUID = 1L;
private static final String WINDOW_TITLE = "ACL Editor";
- private static final ImageIcon ICON_ADD = ClientHelper.getIcon("add.png");
+ private static final ImageIcon ICON_ADD = new AddIcon(ClientHelper.ICON_BUTTON_ICON_SIZE,
+ ClientHelper.ICON_BUTTON_ICON_SIZE);
private final ClientModel model;
private final CmisObject object;
@@ -364,7 +367,8 @@ public class AclEditorFrame extends JFra
private static final Color BACKGROUND2 = UIManager.getColor("Table.alternateRowColor");
private static final Color LINE = new Color(0xB8, 0xB8, 0xB8);
- private static final ImageIcon ICON_REMOVE = ClientHelper.getIcon("remove.png");
+ private static final ImageIcon ICON_REMOVE = new RemoveIcon(ClientHelper.ICON_BUTTON_ICON_SIZE,
+ ClientHelper.ICON_BUTTON_ICON_SIZE);
private final List<String> permissions;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ChangeLogFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ChangeLogFrame.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ChangeLogFrame.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ChangeLogFrame.java Tue May 26 16:22:03 2015
@@ -49,7 +49,7 @@ public class ChangeLogFrame extends JFra
private static final long serialVersionUID = 1L;
- private static final String WINDOW_TITLE = "CMIS Change Logger";
+ private static final String WINDOW_TITLE = "CMIS Change Log";
private final ClientModel model;
@@ -65,9 +65,10 @@ public class ChangeLogFrame extends JFra
private void createGUI() {
setTitle(WINDOW_TITLE + " - " + model.getRepositoryName());
+ setIconImage(ClientHelper.getCmisIcon().getImage());
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- setPreferredSize(new Dimension((int) (screenSize.getWidth() / 4), (int) (screenSize.getHeight() / 2)));
+ setPreferredSize(new Dimension((int) (screenSize.getWidth() / 3), (int) (screenSize.getHeight() / 1.5)));
setMinimumSize(new Dimension(200, 60));
setLayout(new BorderLayout());
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java Tue May 26 16:22:03 2015
@@ -48,6 +48,16 @@ import javax.swing.JToolBar;
import org.apache.chemistry.opencmis.commons.SessionParameter;
import org.apache.chemistry.opencmis.workbench.ClientHelper.FileEntry;
import org.apache.chemistry.opencmis.workbench.details.DetailsTabs;
+import org.apache.chemistry.opencmis.workbench.icons.ChangeLogIcon;
+import org.apache.chemistry.opencmis.workbench.icons.ConnectIcon;
+import org.apache.chemistry.opencmis.workbench.icons.ConsoleIcon;
+import org.apache.chemistry.opencmis.workbench.icons.CreateObjectIcon;
+import org.apache.chemistry.opencmis.workbench.icons.InfoIcon;
+import org.apache.chemistry.opencmis.workbench.icons.LogIcon;
+import org.apache.chemistry.opencmis.workbench.icons.QueryIcon;
+import org.apache.chemistry.opencmis.workbench.icons.RepositoryInfoIcon;
+import org.apache.chemistry.opencmis.workbench.icons.TckIcon;
+import org.apache.chemistry.opencmis.workbench.icons.TypesIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.model.ClientSession;
import org.slf4j.Logger;
@@ -59,7 +69,7 @@ public class ClientFrame extends JFrame
private static final Logger LOG = LoggerFactory.getLogger(ClientFrame.class);
- public static final String SYSPROP_SCRIPTS = ClientSession.WORKBENCH_PREFIX + "scripts";
+ private static final String SYSPROP_SCRIPTS = ClientSession.WORKBENCH_PREFIX + "scripts";
private static final String WINDOW_TITLE = "CMIS Workbench";
@@ -74,6 +84,7 @@ public class ClientFrame extends JFrame
private static final int BUTTON_LOG = 8;
private static final int BUTTON_INFO = 9;
+
private static final String PREFS_X = "x";
private static final String PREFS_Y = "y";
private static final String PREFS_WIDTH = "width";
@@ -116,10 +127,8 @@ public class ClientFrame extends JFrame
private void createGUI() {
setTitle(WINDOW_TITLE);
- ImageIcon icon = ClientHelper.getIcon("icon.png");
- if (icon != null) {
- setIconImage(icon.getImage());
- }
+ ImageIcon icon = ClientHelper.getCmisIcon();
+ setIconImage(icon.getImage());
// Mac OS X goodies
if (ClientHelper.isMacOSX()) {
@@ -162,7 +171,7 @@ public class ClientFrame extends JFrame
toolbarButton = new JButton[10];
- toolbarButton[BUTTON_CONNECT] = new JButton("Connection", ClientHelper.getIcon("connect.png"));
+ toolbarButton[BUTTON_CONNECT] = new JButton("Connection", new ConnectIcon(ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_CONNECT].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
showLoginForm();
@@ -173,8 +182,8 @@ public class ClientFrame extends JFrame
toolBar.addSeparator();
- toolbarButton[BUTTON_REPOSITORY_INFO] = new JButton("Repository Info",
- ClientHelper.getIcon("repository-info.png"));
+ toolbarButton[BUTTON_REPOSITORY_INFO] = new JButton("Repository Info", new RepositoryInfoIcon(ClientHelper.TOOLBAR_ICON_SIZE,
+ ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_REPOSITORY_INFO].setEnabled(false);
toolbarButton[BUTTON_REPOSITORY_INFO].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -184,7 +193,7 @@ public class ClientFrame extends JFrame
toolBar.add(toolbarButton[BUTTON_REPOSITORY_INFO]);
- toolbarButton[BUTTON_TYPES] = new JButton("Types", ClientHelper.getIcon("types.png"));
+ toolbarButton[BUTTON_TYPES] = new JButton("Types", new TypesIcon(ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_TYPES].setEnabled(false);
toolbarButton[BUTTON_TYPES].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -194,7 +203,7 @@ public class ClientFrame extends JFrame
toolBar.add(toolbarButton[BUTTON_TYPES]);
- toolbarButton[BUTTON_QUERY] = new JButton("Query", ClientHelper.getIcon("query.png"));
+ toolbarButton[BUTTON_QUERY] = new JButton("Query", new QueryIcon(ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_QUERY].setEnabled(false);
toolbarButton[BUTTON_QUERY].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -204,7 +213,7 @@ public class ClientFrame extends JFrame
toolBar.add(toolbarButton[BUTTON_QUERY]);
- toolbarButton[BUTTON_CHANGELOG] = new JButton("Change Log", ClientHelper.getIcon("changelog.png"));
+ toolbarButton[BUTTON_CHANGELOG] = new JButton("Change Log", new ChangeLogIcon(ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_CHANGELOG].setEnabled(false);
toolbarButton[BUTTON_CHANGELOG].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -214,7 +223,7 @@ public class ClientFrame extends JFrame
toolBar.add(toolbarButton[BUTTON_CHANGELOG]);
- toolbarButton[BUTTON_CONSOLE] = new JButton("Console", ClientHelper.getIcon("console.png"));
+ toolbarButton[BUTTON_CONSOLE] = new JButton("Console", new ConsoleIcon(ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_CONSOLE].setEnabled(false);
toolbarButton[BUTTON_CONSOLE].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -237,7 +246,7 @@ public class ClientFrame extends JFrame
toolbarConsolePopup.add(menuItem);
}
- toolbarButton[BUTTON_TCK] = new JButton("TCK", ClientHelper.getIcon("tck.png"));
+ toolbarButton[BUTTON_TCK] = new JButton("TCK", new TckIcon(ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_TCK].setEnabled(false);
toolbarButton[BUTTON_TCK].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -300,7 +309,7 @@ public class ClientFrame extends JFrame
}
});
- toolbarButton[BUTTON_CREATE] = new JButton("Create Object", ClientHelper.getIcon("newdocument.png"));
+ toolbarButton[BUTTON_CREATE] = new JButton("Create Object", new CreateObjectIcon(ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_CREATE].setEnabled(false);
toolbarButton[BUTTON_CREATE].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -312,7 +321,7 @@ public class ClientFrame extends JFrame
toolBar.addSeparator();
- toolbarButton[BUTTON_LOG] = new JButton("Log", ClientHelper.getIcon("log.png"));
+ toolbarButton[BUTTON_LOG] = new JButton("Log", new LogIcon(ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_LOG].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
logFrame.showFrame();
@@ -321,7 +330,8 @@ public class ClientFrame extends JFrame
toolBar.add(toolbarButton[BUTTON_LOG]);
- toolbarButton[BUTTON_INFO] = new JButton("Info", ClientHelper.getIcon("info.png"));
+ toolbarButton[BUTTON_INFO] = new JButton("Info", new InfoIcon(ClientHelper.TOOLBAR_ICON_SIZE,
+ ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_INFO].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
infoDialog.showDialog();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java Tue May 26 16:22:03 2015
@@ -93,9 +93,16 @@ public final class ClientHelper {
public static final Color LINK_COLOR = new Color(105, 29, 21);
public static final Color LINK_SELECTED_COLOR = new Color(255, 255, 255);
+ public static final int TOOLBAR_ICON_SIZE = 20;
+ public static final int BUTTON_ICON_SIZE = 11;
+ public static final int OBJECT_ICON_SIZE = 16;
+ public static final int ICON_BUTTON_ICON_SIZE = 16;
+
private static final Logger LOG = LoggerFactory.getLogger(ClientHelper.class);
private static final int BUFFER_SIZE = 64 * 1024;
+ private static final ImageIcon CMIS_ICON = getIcon("icon.png");
+
private ClientHelper() {
}
@@ -215,6 +222,10 @@ public final class ClientHelper {
return null;
}
+ public static ImageIcon getCmisIcon() {
+ return CMIS_ICON;
+ }
+
public static String getDateString(GregorianCalendar cal) {
if (cal == null) {
return "";
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java Tue May 26 16:22:03 2015
@@ -54,6 +54,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
import org.apache.chemistry.opencmis.commons.impl.IOUtils;
+import org.apache.chemistry.opencmis.workbench.icons.NewDocumentIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.model.ClientSession;
import org.apache.chemistry.opencmis.workbench.swing.CreateDialog;
@@ -228,7 +229,8 @@ public class CreateDocumentDialog extend
verifyAfterUploadButton = new JCheckBox("Verify content after upload");
createRow("", verifyAfterUploadButton, 7);
- JButton createButton = new JButton("Create Document", ClientHelper.getIcon("newdocument.png"));
+ JButton createButton = new JButton("Create Document", new NewDocumentIcon(ClientHelper.BUTTON_ICON_SIZE,
+ ClientHelper.BUTTON_ICON_SIZE));
createButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
String name = nameField.getText();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java Tue May 26 16:22:03 2015
@@ -33,6 +33,7 @@ import javax.swing.JTextField;
import org.apache.chemistry.opencmis.client.api.ObjectId;
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
+import org.apache.chemistry.opencmis.workbench.icons.NewFolderIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.swing.CreateDialog;
@@ -75,7 +76,8 @@ public class CreateFolderDialog extends
createRow("Type:", typeBox, 1);
- JButton createButton = new JButton("Create Folder", ClientHelper.getIcon("newfolder.png"));
+ JButton createButton = new JButton("Create Folder", new NewFolderIcon(ClientHelper.BUTTON_ICON_SIZE,
+ ClientHelper.BUTTON_ICON_SIZE));
createButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
String name = nameField.getText();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateItemDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateItemDialog.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateItemDialog.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateItemDialog.java Tue May 26 16:22:03 2015
@@ -37,6 +37,7 @@ import javax.swing.JTextField;
import org.apache.chemistry.opencmis.client.api.ObjectId;
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
+import org.apache.chemistry.opencmis.workbench.icons.NewItemIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.swing.CreateDialog;
@@ -98,7 +99,8 @@ public class CreateItemDialog extends Cr
createRow("Type:", typeBox, 2);
- JButton createButton = new JButton("Create Item", ClientHelper.getIcon("newfolder.png"));
+ JButton createButton = new JButton("Create Item", new NewItemIcon(ClientHelper.BUTTON_ICON_SIZE,
+ ClientHelper.BUTTON_ICON_SIZE));
createButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
String name = nameField.getText();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreatePolicyDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreatePolicyDialog.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreatePolicyDialog.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreatePolicyDialog.java Tue May 26 16:22:03 2015
@@ -37,6 +37,7 @@ import javax.swing.JTextField;
import org.apache.chemistry.opencmis.client.api.ObjectId;
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
+import org.apache.chemistry.opencmis.workbench.icons.NewPolicyIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.swing.CreateDialog;
@@ -102,7 +103,8 @@ public class CreatePolicyDialog extends
policyTextField = new JTextField(60);
createRow("Policy Text:", policyTextField, 3);
- JButton createButton = new JButton("Create Policy", ClientHelper.getIcon("newpolicy.png"));
+ JButton createButton = new JButton("Create Policy", new NewPolicyIcon(ClientHelper.BUTTON_ICON_SIZE,
+ ClientHelper.BUTTON_ICON_SIZE));
createButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
String name = nameField.getText();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java Tue May 26 16:22:03 2015
@@ -33,6 +33,7 @@ import javax.swing.JTextField;
import org.apache.chemistry.opencmis.client.api.ObjectId;
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
+import org.apache.chemistry.opencmis.workbench.icons.NewRelationshipIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.swing.CreateDialog;
@@ -86,7 +87,8 @@ public class CreateRelationshipDialog ex
targetIdField = new JTextField(60);
createRow("Target Id:", targetIdField, 3);
- JButton createButton = new JButton("Create Relationship", ClientHelper.getIcon("newrelationship.png"));
+ JButton createButton = new JButton("Create Relationship", new NewRelationshipIcon(
+ ClientHelper.BUTTON_ICON_SIZE, ClientHelper.BUTTON_ICON_SIZE));
createButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
String name = nameField.getText();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/FolderTable.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/FolderTable.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/FolderTable.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/FolderTable.java Tue May 26 16:22:03 2015
@@ -31,8 +31,8 @@ import java.awt.event.MouseEvent;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
+import java.util.EnumMap;
import java.util.GregorianCalendar;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -54,6 +54,13 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.Document;
import org.apache.chemistry.opencmis.client.api.Folder;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
+import org.apache.chemistry.opencmis.workbench.icons.CheckedOutIcon;
+import org.apache.chemistry.opencmis.workbench.icons.DocumentIcon;
+import org.apache.chemistry.opencmis.workbench.icons.FolderIcon;
+import org.apache.chemistry.opencmis.workbench.icons.ItemIcon;
+import org.apache.chemistry.opencmis.workbench.icons.PolicyIcon;
+import org.apache.chemistry.opencmis.workbench.icons.PwcIcon;
+import org.apache.chemistry.opencmis.workbench.icons.RelationshipIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.model.ClientModelEvent;
import org.apache.chemistry.opencmis.workbench.model.FolderListener;
@@ -173,15 +180,17 @@ public class FolderTable extends JTable
}
private void loadIcons() {
- icons = new HashMap<BaseTypeId, ImageIcon>();
- icons.put(BaseTypeId.CMIS_DOCUMENT, ClientHelper.getIcon("document.png"));
- icons.put(BaseTypeId.CMIS_FOLDER, ClientHelper.getIcon("folder.png"));
- icons.put(BaseTypeId.CMIS_RELATIONSHIP, ClientHelper.getIcon("relationship.png"));
- icons.put(BaseTypeId.CMIS_POLICY, ClientHelper.getIcon("policy.png"));
- icons.put(BaseTypeId.CMIS_ITEM, ClientHelper.getIcon("item.png"));
+ icons = new EnumMap<BaseTypeId, ImageIcon>(BaseTypeId.class);
+ icons.put(BaseTypeId.CMIS_DOCUMENT, new DocumentIcon(ClientHelper.OBJECT_ICON_SIZE,
+ ClientHelper.OBJECT_ICON_SIZE));
+ icons.put(BaseTypeId.CMIS_FOLDER, new FolderIcon(ClientHelper.OBJECT_ICON_SIZE, ClientHelper.OBJECT_ICON_SIZE));
+ icons.put(BaseTypeId.CMIS_RELATIONSHIP, new RelationshipIcon(ClientHelper.OBJECT_ICON_SIZE,
+ ClientHelper.OBJECT_ICON_SIZE));
+ icons.put(BaseTypeId.CMIS_POLICY, new PolicyIcon(ClientHelper.OBJECT_ICON_SIZE, ClientHelper.OBJECT_ICON_SIZE));
+ icons.put(BaseTypeId.CMIS_ITEM, new ItemIcon(ClientHelper.OBJECT_ICON_SIZE, ClientHelper.OBJECT_ICON_SIZE));
- checkedOutIcon = ClientHelper.getIcon("checkedout.png");
- pwcIcon = ClientHelper.getIcon("pwc.png");
+ checkedOutIcon = new CheckedOutIcon(ClientHelper.OBJECT_ICON_SIZE, ClientHelper.OBJECT_ICON_SIZE);
+ pwcIcon = new PwcIcon(ClientHelper.OBJECT_ICON_SIZE, ClientHelper.OBJECT_ICON_SIZE);
}
public void folderLoaded(final ClientModelEvent event) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/InfoDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/InfoDialog.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/InfoDialog.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/InfoDialog.java Tue May 26 16:22:03 2015
@@ -58,7 +58,7 @@ public class InfoDialog extends JDialog
JPanel topPanel = new JPanel(new FlowLayout());
- JLabel cmisLogo = new JLabel(ClientHelper.getIcon("icon.png"));
+ JLabel cmisLogo = new JLabel(ClientHelper.getCmisIcon());
topPanel.add(cmisLogo);
Font labelFont = UIManager.getFont("Label.font");
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LogFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LogFrame.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LogFrame.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LogFrame.java Tue May 26 16:22:03 2015
@@ -51,6 +51,7 @@ public class LogFrame extends JFrame {
private void createGUI() {
setTitle(WINDOW_TITLE);
+ setIconImage(ClientHelper.getCmisIcon().getImage());
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setPreferredSize(new Dimension((int) (screenSize.getWidth() / 2), (int) (screenSize.getHeight() / 2)));
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java Tue May 26 16:22:03 2015
@@ -69,6 +69,10 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.Cardinality;
import org.apache.chemistry.opencmis.commons.enums.Updatability;
import org.apache.chemistry.opencmis.workbench.PropertyEditorFrame.UpdateStatus.StatusFlag;
+import org.apache.chemistry.opencmis.workbench.icons.AddIcon;
+import org.apache.chemistry.opencmis.workbench.icons.DownIcon;
+import org.apache.chemistry.opencmis.workbench.icons.RemoveIcon;
+import org.apache.chemistry.opencmis.workbench.icons.UpIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
/**
@@ -79,7 +83,8 @@ public class PropertyEditorFrame extends
private static final long serialVersionUID = 1L;
private static final String WINDOW_TITLE = "Property Editor";
- private static final ImageIcon ICON_ADD = ClientHelper.getIcon("add.png");
+ private static final ImageIcon ICON_ADD = new AddIcon(ClientHelper.ICON_BUTTON_ICON_SIZE,
+ ClientHelper.ICON_BUTTON_ICON_SIZE);
private final ClientModel model;
private final CmisObject object;
@@ -96,6 +101,7 @@ public class PropertyEditorFrame extends
private void createGUI() {
setTitle(WINDOW_TITLE);
+ setIconImage(ClientHelper.getCmisIcon().getImage());
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setPreferredSize(new Dimension((int) (screenSize.getWidth() / 2), (int) (screenSize.getHeight() / 1.5)));
@@ -717,9 +723,12 @@ public class PropertyEditorFrame extends
public static class MultiValuePropertyInputField extends JPanel implements PropertyValue {
private static final long serialVersionUID = 1L;
- private static final ImageIcon ICON_UP = ClientHelper.getIcon("up.png");
- private static final ImageIcon ICON_DOWN = ClientHelper.getIcon("down.png");
- private static final ImageIcon ICON_REMOVE = ClientHelper.getIcon("remove.png");
+ private static final ImageIcon ICON_UP = new UpIcon(ClientHelper.ICON_BUTTON_ICON_SIZE,
+ ClientHelper.ICON_BUTTON_ICON_SIZE);
+ private static final ImageIcon ICON_DOWN = new DownIcon(ClientHelper.ICON_BUTTON_ICON_SIZE,
+ ClientHelper.ICON_BUTTON_ICON_SIZE);
+ private static final ImageIcon ICON_REMOVE = new RemoveIcon(ClientHelper.ICON_BUTTON_ICON_SIZE,
+ ClientHelper.ICON_BUTTON_ICON_SIZE);
private final JComponent component;
private int position;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/QueryFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/QueryFrame.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/QueryFrame.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/QueryFrame.java Tue May 26 16:22:03 2015
@@ -59,6 +59,8 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.runtime.ObjectIdImpl;
import org.apache.chemistry.opencmis.commons.PropertyIds;
import org.apache.chemistry.opencmis.commons.data.PropertyData;
+import org.apache.chemistry.opencmis.workbench.icons.CopyIcon;
+import org.apache.chemistry.opencmis.workbench.icons.QueryIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.swing.IdRenderer;
@@ -102,6 +104,7 @@ public class QueryFrame extends JFrame {
private void createGUI() {
setTitle(WINDOW_TITLE + " - " + model.getRepositoryName());
+ setIconImage(ClientHelper.getCmisIcon().getImage());
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setPreferredSize(new Dimension((int) (screenSize.getWidth() / 2), (int) (screenSize.getHeight() / 2)));
@@ -138,7 +141,8 @@ public class QueryFrame extends JFrame {
searchAllVersionsCheckBox = new JCheckBox("search all versions", false);
buttonPanel.add(searchAllVersionsCheckBox);
- JButton queryButton = new JButton("Query", ClientHelper.getIcon("query.png"));
+ JButton queryButton = new JButton("Query", new QueryIcon(ClientHelper.BUTTON_ICON_SIZE,
+ ClientHelper.BUTTON_ICON_SIZE));
queryButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
doQuery();
@@ -162,7 +166,7 @@ public class QueryFrame extends JFrame {
snippetsPopup.add(menuItem);
}
- final JButton snippetButton = new JButton("Query Snippets", ClientHelper.getIcon("paste.png"));
+ final JButton snippetButton = new JButton("Query Snippets", new CopyIcon(20, 20));
snippetButton.setFocusPainted(true);
snippetButton.setBorderPainted(false);
snippetButton.setContentAreaFilled(false);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/RepositoryInfoFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/RepositoryInfoFrame.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/RepositoryInfoFrame.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/RepositoryInfoFrame.java Tue May 26 16:22:03 2015
@@ -65,7 +65,7 @@ public class RepositoryInfoFrame extends
setTitle(WINDOW_TITLE + " - " + model.getRepositoryName());
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- setPreferredSize(new Dimension((int) (screenSize.getWidth() / 3), (int) (screenSize.getHeight() / 2)));
+ setPreferredSize(new Dimension((int) (screenSize.getWidth() / 3), (int) (screenSize.getHeight() / 1.5)));
setMinimumSize(new Dimension(200, 60));
RepositoryInfo repInfo = null;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java Tue May 26 16:22:03 2015
@@ -76,6 +76,7 @@ import org.apache.chemistry.opencmis.tck
import org.apache.chemistry.opencmis.tck.impl.TestParameters;
import org.apache.chemistry.opencmis.tck.runner.AbstractRunner;
import org.apache.chemistry.opencmis.workbench.checks.SwingReport;
+import org.apache.chemistry.opencmis.workbench.icons.TckIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
/**
@@ -233,7 +234,8 @@ public class TckDialog {
mainPanel.add(configPanel, BorderLayout.LINE_END);
add(mainPanel, BorderLayout.CENTER);
- final JButton runButton = new JButton("Run TCK", ClientHelper.getIcon("tck.png"));
+ final JButton runButton = new JButton("Run TCK", new TckIcon(ClientHelper.BUTTON_ICON_SIZE,
+ ClientHelper.BUTTON_ICON_SIZE));
runButton.setDefaultCapable(true);
runButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypeSplitPane.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypeSplitPane.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypeSplitPane.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypeSplitPane.java Tue May 26 16:22:03 2015
@@ -51,6 +51,7 @@ import org.apache.chemistry.opencmis.tck
import org.apache.chemistry.opencmis.workbench.checks.SwingReport;
import org.apache.chemistry.opencmis.workbench.checks.TypeComplianceTestGroup;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
+import org.apache.chemistry.opencmis.workbench.swing.BaseTypeLabel;
import org.apache.chemistry.opencmis.workbench.swing.CollectionRenderer;
import org.apache.chemistry.opencmis.workbench.swing.InfoPanel;
import org.apache.chemistry.opencmis.workbench.swing.YesNoLabel;
@@ -105,7 +106,7 @@ public class TypeSplitPane extends JSpli
private JTextField localNamespaceField;
private JTextField localNameField;
private JTextField queryNameField;
- private JTextField baseTypeField;
+ private BaseTypeLabel baseTypeField;
private YesNoLabel creatableLabel;
private YesNoLabel fileableLabel;
private YesNoLabel queryableLabel;
@@ -133,7 +134,7 @@ public class TypeSplitPane extends JSpli
localNamespaceField.setText(type.getLocalNamespace());
localNameField.setText(type.getLocalName());
queryNameField.setText(type.getQueryName());
- baseTypeField.setText(type.getBaseTypeId().value());
+ baseTypeField.setValue(type.getBaseTypeId());
creatableLabel.setValue(is(type.isCreatable()));
fileableLabel.setValue(is(type.isFileable()));
queryableLabel.setValue(is(type.isQueryable()));
@@ -201,7 +202,7 @@ public class TypeSplitPane extends JSpli
localNamespaceField.setText("");
localNameField.setText("");
queryNameField.setText("");
- baseTypeField.setText("");
+ baseTypeField.setValue(null);
creatableLabel.setValue(false);
fileableLabel.setValue(false);
queryableLabel.setValue(false);
@@ -229,7 +230,7 @@ public class TypeSplitPane extends JSpli
localNamespaceField = addLine("Local Namespace:");
localNameField = addLine("Local Name:");
queryNameField = addLine("Query Name:");
- baseTypeField = addLine("Base Type:");
+ baseTypeField = addBaseTypeLabel("Base Type:");
creatableLabel = addYesNoLabel("Creatable:");
fileableLabel = addYesNoLabel("Fileable:");
queryableLabel = addYesNoLabel("Queryable:");
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypesFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypesFrame.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypesFrame.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TypesFrame.java Tue May 26 16:22:03 2015
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.wo
import static org.apache.chemistry.opencmis.commons.impl.CollectionsHelper.isNotEmpty;
import java.awt.BorderLayout;
+import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Toolkit;
@@ -35,7 +36,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
-import javax.swing.ImageIcon;
+import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
@@ -50,6 +51,7 @@ import javax.swing.event.TreeSelectionEv
import javax.swing.event.TreeSelectionListener;
import javax.swing.filechooser.FileFilter;
import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeSelectionModel;
@@ -62,6 +64,12 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
import org.apache.chemistry.opencmis.commons.impl.IOUtils;
+import org.apache.chemistry.opencmis.workbench.icons.BaseTypeIcon;
+import org.apache.chemistry.opencmis.workbench.icons.CreateTypeIcon;
+import org.apache.chemistry.opencmis.workbench.icons.DeleteTypeIcon;
+import org.apache.chemistry.opencmis.workbench.icons.SaveTypeIcon;
+import org.apache.chemistry.opencmis.workbench.icons.TypeIcon;
+import org.apache.chemistry.opencmis.workbench.icons.UpdateTypeIcon;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
public class TypesFrame extends JFrame {
@@ -96,11 +104,7 @@ public class TypesFrame extends JFrame {
private void createGUI() {
setTitle(WINDOW_TITLE + " - " + model.getRepositoryName());
-
- ImageIcon icon = ClientHelper.getIcon("icon.png");
- if (icon != null) {
- setIconImage(icon.getImage());
- }
+ setIconImage(ClientHelper.getCmisIcon().getImage());
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setPreferredSize(new Dimension((int) (screenSize.getWidth() / 1.5), (int) (screenSize.getHeight() / 1.5)));
@@ -164,7 +168,8 @@ public class TypesFrame extends JFrame {
}
});
- toolbarButton[BUTTON_SAVE] = new JButton("Save Type Definition", ClientHelper.getIcon("savetype.png"));
+ toolbarButton[BUTTON_SAVE] = new JButton("Save Type Definition", new SaveTypeIcon(
+ ClientHelper.TOOLBAR_ICON_SIZE, ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_SAVE].addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
@@ -233,7 +238,8 @@ public class TypesFrame extends JFrame {
}
});
- toolbarButton[BUTTON_UPDATE] = new JButton("Update Type", ClientHelper.getIcon("updatetype.png"));
+ toolbarButton[BUTTON_UPDATE] = new JButton("Update Type", new UpdateTypeIcon(ClientHelper.TOOLBAR_ICON_SIZE,
+ ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_UPDATE].setEnabled(repInfo.getCmisVersion() != CmisVersion.CMIS_1_0);
toolbarButton[BUTTON_UPDATE].addActionListener(new ActionListener() {
@Override
@@ -244,7 +250,8 @@ public class TypesFrame extends JFrame {
toolBar.add(toolbarButton[BUTTON_UPDATE]);
// -- delete --
- toolbarButton[BUTTON_DELETE] = new JButton("Delete Type", ClientHelper.getIcon("deletetype.png"));
+ toolbarButton[BUTTON_DELETE] = new JButton("Delete Type", new DeleteTypeIcon(ClientHelper.TOOLBAR_ICON_SIZE,
+ ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_DELETE].setEnabled(repInfo.getCmisVersion() != CmisVersion.CMIS_1_0);
toolbarButton[BUTTON_DELETE].addActionListener(new ActionListener() {
@Override
@@ -324,7 +331,8 @@ public class TypesFrame extends JFrame {
}
});
- toolbarButton[BUTTON_CREATE] = new JButton("Create Type", ClientHelper.getIcon("newtype.png"));
+ toolbarButton[BUTTON_CREATE] = new JButton("Create Type", new CreateTypeIcon(ClientHelper.TOOLBAR_ICON_SIZE,
+ ClientHelper.TOOLBAR_ICON_SIZE));
toolbarButton[BUTTON_CREATE].setEnabled(repInfo.getCmisVersion() != CmisVersion.CMIS_1_0);
toolbarButton[BUTTON_CREATE].addActionListener(new ActionListener() {
@Override
@@ -339,6 +347,7 @@ public class TypesFrame extends JFrame {
typesTree = new JTree();
typesTree.setRootVisible(false);
typesTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
+ typesTree.setCellRenderer(new TreeCellRenderer());
typesTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
@@ -504,7 +513,7 @@ public class TypesFrame extends JFrame {
}
}
- static class TypeNode {
+ private static class TypeNode {
private final ObjectType type;
public TypeNode(ObjectType type) {
@@ -520,4 +529,30 @@ public class TypesFrame extends JFrame {
return type.getDisplayName() + " (" + type.getId() + ")";
}
}
+
+ private static class TreeCellRenderer extends DefaultTreeCellRenderer {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Icon BASETYPE_ICON = new BaseTypeIcon(ClientHelper.OBJECT_ICON_SIZE,
+ ClientHelper.OBJECT_ICON_SIZE);
+ private static final Icon TYPE_ICON = new TypeIcon(ClientHelper.OBJECT_ICON_SIZE, ClientHelper.OBJECT_ICON_SIZE);
+
+ @Override
+ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded,
+ boolean leaf, int row, boolean hasFocus) {
+ Component comp = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
+
+ Object node = ((DefaultMutableTreeNode) value).getUserObject();
+ if (node instanceof TypeNode) {
+ if (((TypeNode) node).getType().isBaseType()) {
+ setIcon(BASETYPE_ICON);
+ } else {
+ setIcon(TYPE_ICON);
+ }
+ }
+
+ return comp;
+ }
+ }
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/Workbench.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/Workbench.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/Workbench.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/Workbench.java Tue May 26 16:22:03 2015
@@ -18,13 +18,21 @@
*/
package org.apache.chemistry.opencmis.workbench;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Insets;
import java.net.Authenticator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
+import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
+import javax.swing.plaf.FontUIResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -83,6 +91,57 @@ public class Workbench {
});
}
+ private static class Nimbus extends javax.swing.plaf.nimbus.NimbusLookAndFeel {
+
+ private double factor = 3.0;
+
+ @Override
+ public UIDefaults getDefaults() {
+ UIDefaults ret = super.getDefaults();
+
+ Map<String, Object> newFonts = new HashMap<String, Object>();
+
+ Enumeration<Object> e = (Enumeration<Object>) ret.keys();
+ while (e.hasMoreElements()) {
+ String key = e.nextElement().toString();
+
+ Font font = ret.getFont(key);
+ if (font != null) {
+ Font newFont = font.deriveFont((float) (font.getSize() * factor));
+ newFonts.put(key, newFont);
+ }
+
+ Insets insets = ret.getInsets(key);
+ if (insets != null) {
+ Insets newInsets = new Insets((int) (insets.top * factor), (int) (insets.left * factor),
+ (int) (insets.bottom * factor), (int) (insets.right * factor));
+ newFonts.put(key, newInsets);
+ }
+
+ Dimension dimension = ret.getDimension(key);
+ if (dimension != null) {
+ Dimension newdimension = new Dimension((int) (dimension.width * factor),
+ (int) (dimension.height * factor));
+ newFonts.put(key, newdimension);
+ }
+
+ }
+
+ for (Map.Entry<String, Object> nf : newFonts.entrySet()) {
+ ret.put(nf.getKey(), nf.getValue());
+ }
+
+ return ret;
+ }
+
+ private void scaleFont(UIDefaults defs, String fontName) {
+ Font font = (Font) defs.get(fontName);
+ Font newFont = font.deriveFont((float) (font.getSize() * factor));
+ defs.put(fontName, newFont);
+ }
+
+ }
+
public static void main(String[] args) {
new Workbench();
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/ObjectPanel.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/ObjectPanel.java?rev=1681790&r1=1681789&r2=1681790&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/ObjectPanel.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/ObjectPanel.java Tue May 26 16:22:03 2015
@@ -18,7 +18,7 @@
*/
package org.apache.chemistry.opencmis.workbench.details;
-import static org.apache.chemistry.opencmis.commons.impl.CollectionsHelper.*;
+import static org.apache.chemistry.opencmis.commons.impl.CollectionsHelper.isNullOrEmpty;
import groovy.ui.Console;
import java.awt.BorderLayout;
@@ -54,7 +54,6 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.Folder;
import org.apache.chemistry.opencmis.client.api.SecondaryType;
import org.apache.chemistry.opencmis.client.api.Session;
-import org.apache.chemistry.opencmis.client.bindings.spi.LinkAccess;
import org.apache.chemistry.opencmis.commons.SessionParameter;
import org.apache.chemistry.opencmis.tck.CmisTestGroup;
import org.apache.chemistry.opencmis.workbench.ClientHelper;
@@ -64,6 +63,7 @@ import org.apache.chemistry.opencmis.wor
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.model.ClientModelEvent;
import org.apache.chemistry.opencmis.workbench.model.ObjectListener;
+import org.apache.chemistry.opencmis.workbench.swing.BaseTypeLabel;
import org.apache.chemistry.opencmis.workbench.swing.InfoPanel;
public class ObjectPanel extends InfoPanel implements ObjectListener {
@@ -75,7 +75,7 @@ public class ObjectPanel extends InfoPan
private JTextField nameField;
private JTextField idField;
private JTextField typeField;
- private JTextField basetypeField;
+ private BaseTypeLabel basetypeField;
private InfoList secondaryTypesList;
private JTextField versionLabelField;
private JTextField pwcField;
@@ -116,7 +116,7 @@ public class ObjectPanel extends InfoPan
nameField.setText("");
idField.setText("");
typeField.setText("");
- basetypeField.setText("");
+ basetypeField.setValue(null);
secondaryTypesList.removeAll();
versionLabelField.setText("");
pwcField.setText("");
@@ -132,7 +132,7 @@ public class ObjectPanel extends InfoPan
nameField.setText(object.getName());
idField.setText(object.getId());
typeField.setText(object.getType().getId());
- basetypeField.setText(object.getBaseTypeId().toString());
+ basetypeField.setValue(object.getBaseTypeId());
if (object.getSecondaryTypes() != null) {
List<String> secTypeIds = new ArrayList<String>();
@@ -247,7 +247,7 @@ public class ObjectPanel extends InfoPan
nameField = addLine("Name:", true);
idField = addId("Id:");
typeField = addLine("Type:");
- basetypeField = addLine("Base Type:");
+ basetypeField = addBaseTypeLabel("Base Type:");
secondaryTypesList = addComponent("Secondary Types:", new InfoList());
pathsList = addComponent("Paths:", new InfoList());
versionLabelField = addLine("Version Label:");
@@ -378,12 +378,7 @@ public class ObjectPanel extends InfoPan
return null;
}
- if (session.getBinding().getObjectService() instanceof LinkAccess) {
- return ((LinkAccess) session.getBinding().getObjectService()).loadContentLink(session.getRepositoryInfo()
- .getId(), document.getId());
- }
-
- return null;
+ return ((Document) document).getContentUrl();
}
private static class JTextAreaWriter extends Writer {
Added: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AbstractWorkbenchIcon.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AbstractWorkbenchIcon.java?rev=1681790&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AbstractWorkbenchIcon.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AbstractWorkbenchIcon.java Tue May 26 16:22:03 2015
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.workbench.icons;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+import java.awt.image.BufferedImage;
+
+import javax.swing.ImageIcon;
+
+import org.apache.chemistry.opencmis.workbench.WorkbenchScale;
+
+public abstract class AbstractWorkbenchIcon extends ImageIcon {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final static Color DEFAULT_COLOR = new Color(0x33628c);
+
+ protected int width;
+ protected int height;
+ protected BufferedImage image = null;
+
+ public AbstractWorkbenchIcon() {
+ this.width = WorkbenchScale.isScaling() ? (int) ((float) getOrginalWidth() * WorkbenchScale.getScaleFactor())
+ : getOrginalWidth();
+ this.height = WorkbenchScale.isScaling() ? (int) ((float) getOrginalHeight() * WorkbenchScale.getScaleFactor())
+ : getOrginalHeight();
+ renderIcon();
+ }
+
+ public AbstractWorkbenchIcon(int width, int height) {
+ this.width = WorkbenchScale.isScaling() ? (int) ((float) width * WorkbenchScale.getScaleFactor()) : width;
+ this.height = WorkbenchScale.isScaling() ? (int) ((float) height * WorkbenchScale.getScaleFactor()) : height;
+ renderIcon();
+ }
+
+ private final void renderIcon() {
+ BufferedImage image = new BufferedImage(getIconWidth(), getIconHeight(), BufferedImage.TYPE_INT_ARGB);
+ double coef = Math.min((double) width / (double) getOrginalWidth(), (double) height
+ / (double) getOrginalHeight());
+
+ Graphics2D g2d = image.createGraphics();
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.scale(coef, coef);
+ paint(g2d);
+
+ setImage(image);
+
+ g2d.dispose();
+ }
+
+ @Override
+ public int getIconHeight() {
+ return height;
+ }
+
+ @Override
+ public int getIconWidth() {
+ return width;
+ }
+
+ protected Color getColor() {
+ return DEFAULT_COLOR;
+ }
+
+ protected abstract int getOrginalHeight();
+
+ protected abstract int getOrginalWidth();
+
+ protected abstract void paint(Graphics2D g);
+
+ protected void paintPlusBadge(Graphics2D g, Color color) {
+ GeneralPath shape = new GeneralPath();
+
+ shape.moveTo(59.82887, 47.315468);
+ shape.lineTo(55.657738, 47.315468);
+ shape.lineTo(55.657738, 43.144333);
+ shape.curveTo(55.657738, 40.840477, 53.790462, 38.9732, 51.486603, 38.9732);
+ shape.curveTo(49.182747, 38.9732, 47.31547, 40.840477, 47.31547, 43.144333);
+ shape.lineTo(47.31547, 47.315468);
+ shape.lineTo(43.144337, 47.315468);
+ shape.curveTo(40.84048, 47.315468, 38.973206, 49.182743, 38.973206, 51.4866);
+ shape.curveTo(38.973206, 53.790455, 40.84048, 55.657734, 43.144337, 55.657734);
+ shape.lineTo(47.31547, 55.657734);
+ shape.lineTo(47.31547, 59.828865);
+ shape.curveTo(47.315468, 62.132725, 49.182747, 64.0, 51.4866, 64.0);
+ shape.curveTo(53.790455, 64.0, 55.657734, 62.132725, 55.657734, 59.828865);
+ shape.lineTo(55.657734, 55.65773);
+ shape.lineTo(59.828865, 55.65773);
+ shape.curveTo(62.132725, 55.657734, 64.0, 53.79046, 64.0, 51.4866);
+ shape.curveTo(64.0, 49.182747, 62.132725, 47.315468, 59.82887, 47.315468);
+ shape.closePath();
+
+ g.setPaint(color);
+ g.fill(shape);
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AddIcon.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AddIcon.java?rev=1681790&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AddIcon.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AddIcon.java Tue May 26 16:22:03 2015
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.workbench.icons;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+public class AddIcon extends AbstractWorkbenchIcon {
+
+ private static final long serialVersionUID = 1L;
+
+ public AddIcon() {
+ super();
+ }
+
+ public AddIcon(int width, int height) {
+ super(width, height);
+ }
+
+ @Override
+ protected int getOrginalHeight() {
+ return 64;
+ }
+
+ @Override
+ protected int getOrginalWidth() {
+ return 64;
+ }
+
+ protected void paint(Graphics2D g) {
+ GeneralPath shape = new GeneralPath();
+
+ shape.moveTo(52.0, 29.0);
+ shape.lineTo(35.0, 29.0);
+ shape.lineTo(35.0, 12.0);
+ shape.curveTo(35.0, 10.343, 33.657, 9.0, 32.0, 9.0);
+ shape.curveTo(30.342999, 9.0, 29.0, 10.343, 29.0, 12.0);
+ shape.lineTo(29.0, 29.0);
+ shape.lineTo(12.0, 29.0);
+ shape.curveTo(10.343, 29.0, 9.0, 30.343, 9.0, 32.0);
+ shape.curveTo(9.0, 33.656998, 10.343, 35.0, 12.0, 35.0);
+ shape.lineTo(29.0, 35.0);
+ shape.lineTo(29.0, 52.0);
+ shape.curveTo(29.0, 53.657, 30.343, 55.0, 32.0, 55.0);
+ shape.curveTo(33.656998, 55.0, 35.0, 53.657, 35.0, 52.0);
+ shape.lineTo(35.0, 35.0);
+ shape.lineTo(52.0, 35.0);
+ shape.curveTo(53.657, 35.0, 55.0, 33.657, 55.0, 32.0);
+ shape.curveTo(55.0, 30.342999, 53.657, 29.0, 52.0, 29.0);
+ shape.closePath();
+
+ g.setPaint(getColor());
+ g.fill(shape);
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/BaseTypeIcon.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/BaseTypeIcon.java?rev=1681790&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/BaseTypeIcon.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/BaseTypeIcon.java Tue May 26 16:22:03 2015
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.workbench.icons;
+
+import java.awt.Color;
+
+public class BaseTypeIcon extends TypeIcon {
+
+ private static final long serialVersionUID = 1L;
+
+ public BaseTypeIcon() {
+ super();
+ }
+
+ public BaseTypeIcon(int width, int height) {
+ super(width, height);
+ }
+
+ @Override
+ protected Color getColor() {
+ return new Color(0x8c5c32);
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/ChangeLogIcon.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/ChangeLogIcon.java?rev=1681790&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/ChangeLogIcon.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/ChangeLogIcon.java Tue May 26 16:22:03 2015
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.workbench.icons;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+public class ChangeLogIcon extends AbstractWorkbenchIcon {
+
+ private static final long serialVersionUID = 1L;
+
+ public ChangeLogIcon() {
+ super();
+ }
+
+ public ChangeLogIcon(int width, int height) {
+ super(width, height);
+ }
+
+ @Override
+ protected int getOrginalHeight() {
+ return 64;
+ }
+
+ @Override
+ protected int getOrginalWidth() {
+ return 64;
+ }
+
+ protected void paint(Graphics2D g) {
+ GeneralPath shape = new GeneralPath();
+
+ shape.moveTo(9.0, 45.0);
+ shape.lineTo(3.0, 45.0);
+ shape.curveTo(1.343, 45.0, 0.0, 46.343, 0.0, 48.0);
+ shape.curveTo(0.0, 49.657, 1.343, 51.0, 3.0, 51.0);
+ shape.lineTo(9.0, 51.0);
+ shape.lineTo(9.0, 51.0);
+ shape.curveTo(10.657, 51.0, 12.0, 49.657, 12.0, 48.0);
+ shape.curveTo(12.0, 46.343, 10.657, 45.0, 9.0, 45.0);
+ shape.closePath();
+ shape.moveTo(61.0, 29.0);
+ shape.lineTo(21.0, 29.0);
+ shape.curveTo(19.343, 29.0, 18.0, 30.343, 18.0, 32.0);
+ shape.curveTo(18.0, 33.656998, 19.343, 35.0, 21.0, 35.0);
+ shape.lineTo(21.0, 35.0);
+ shape.lineTo(61.0, 35.0);
+ shape.curveTo(62.657, 35.0, 64.0, 33.657, 64.0, 32.0);
+ shape.curveTo(64.0, 30.342999, 62.657, 29.0, 61.0, 29.0);
+ shape.closePath();
+ shape.moveTo(9.0, 29.0);
+ shape.lineTo(3.0, 29.0);
+ shape.curveTo(1.343, 29.0, 0.0, 30.343, 0.0, 32.0);
+ shape.curveTo(0.0, 33.656998, 1.343, 35.0, 3.0, 35.0);
+ shape.lineTo(9.0, 35.0);
+ shape.lineTo(9.0, 35.0);
+ shape.curveTo(10.657, 35.0, 12.0, 33.657, 12.0, 32.0);
+ shape.curveTo(12.0, 30.342999, 10.657, 29.0, 9.0, 29.0);
+ shape.closePath();
+ shape.moveTo(21.0, 19.0);
+ shape.lineTo(61.0, 19.0);
+ shape.curveTo(62.657, 19.0, 64.0, 17.657, 64.0, 16.0);
+ shape.curveTo(64.0, 14.343, 62.657, 13.0, 61.0, 13.0);
+ shape.lineTo(21.001, 13.0);
+ shape.lineTo(21.0, 13.0);
+ shape.curveTo(19.343, 13.0, 18.0, 14.343, 18.0, 16.0);
+ shape.curveTo(18.0, 17.657, 19.343, 19.0, 21.0, 19.0);
+ shape.closePath();
+ shape.moveTo(9.0, 13.0);
+ shape.lineTo(9.0, 13.0);
+ shape.lineTo(3.0, 13.0);
+ shape.curveTo(1.343, 13.0, 0.0, 14.343, 0.0, 16.0);
+ shape.curveTo(0.0, 17.657, 1.343, 19.0, 3.0, 19.0);
+ shape.lineTo(9.0, 19.0);
+ shape.curveTo(10.657, 19.0, 12.0, 17.657, 12.0, 16.0);
+ shape.curveTo(12.0, 14.343, 10.657, 13.0, 9.0, 13.0);
+ shape.closePath();
+ shape.moveTo(61.0, 45.0);
+ shape.lineTo(21.0, 45.0);
+ shape.curveTo(19.343, 45.0, 18.0, 46.343, 18.0, 48.0);
+ shape.curveTo(18.0, 49.657, 19.343, 51.0, 21.0, 51.0);
+ shape.lineTo(21.0, 51.0);
+ shape.lineTo(61.0, 51.0);
+ shape.curveTo(62.657, 51.0, 64.0, 49.657, 64.0, 48.0);
+ shape.curveTo(64.0, 46.343, 62.657, 45.0, 61.0, 45.0);
+ shape.closePath();
+
+ g.setPaint(getColor());
+ g.fill(shape);
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/CheckedOutIcon.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/CheckedOutIcon.java?rev=1681790&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/CheckedOutIcon.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/CheckedOutIcon.java Tue May 26 16:22:03 2015
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.workbench.icons;
+
+import java.awt.Color;
+
+public class CheckedOutIcon extends DocumentIcon {
+
+ private static final long serialVersionUID = 1L;
+
+ public CheckedOutIcon() {
+ super();
+ }
+
+ public CheckedOutIcon(int width, int height) {
+ super(width, height);
+ }
+
+ protected Color getColor() {
+ return new Color(0x8c5c32);
+ }
+}