diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
commit | abada90e3f84dc703b8ddc9efcbed8a946fadead (patch) | |
tree | 2c6f9dccd510ea97cb927a7bd635422efaae547a /java/src/IceGridGUI/MainPane.java | |
parent | removing trace message (diff) | |
download | ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2 ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip |
Expanded tabs into spaces
Diffstat (limited to 'java/src/IceGridGUI/MainPane.java')
-rwxr-xr-x | java/src/IceGridGUI/MainPane.java | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/java/src/IceGridGUI/MainPane.java b/java/src/IceGridGUI/MainPane.java index 6fa4ea4603e..737a09f661b 100755 --- a/java/src/IceGridGUI/MainPane.java +++ b/java/src/IceGridGUI/MainPane.java @@ -19,134 +19,134 @@ public class MainPane extends JTabbedPane { public void addApplication(ApplicationPane application) { - IceGridGUI.Application.Root root = application.getRoot(); - super.addTab(computeTitle(root.getId()), - getIcon(root), application); + IceGridGUI.Application.Root root = application.getRoot(); + super.addTab(computeTitle(root.getId()), + getIcon(root), application); } public void setTitleAt(int index, String title) { - super.setTitleAt(index, computeTitle(title)); + super.setTitleAt(index, computeTitle(title)); } public void resetTitle(IceGridGUI.Application.Root root) { - int i = findIndex(root); - if(i > 0) - { - setTitleAt(i, root.getId()); - } + int i = findIndex(root); + if(i > 0) + { + setTitleAt(i, root.getId()); + } } public void resetIcon(IceGridGUI.Application.Root root) { - int i = findIndex(root); - if(i > 0) - { - setIconAt(i, getIcon(root)); - } + int i = findIndex(root); + if(i > 0) + { + setIconAt(i, getIcon(root)); + } } public int findIndex(IceGridGUI.Application.Root root) { - for(int i = 1; i < getTabCount(); ++i) - { - ApplicationPane pane = (ApplicationPane)getComponentAt(i); - if(pane.getRoot() == root) - { - return i; - } - } - return -1; + for(int i = 1; i < getTabCount(); ++i) + { + ApplicationPane pane = (ApplicationPane)getComponentAt(i); + if(pane.getRoot() == root) + { + return i; + } + } + return -1; } public ApplicationPane findApplication(IceGridGUI.Application.Root root) { - for(int i = 1; i < getTabCount(); ++i) - { - ApplicationPane pane = (ApplicationPane)getComponentAt(i); - if(pane.getRoot() == root) - { - return pane; - } - } - return null; + for(int i = 1; i < getTabCount(); ++i) + { + ApplicationPane pane = (ApplicationPane)getComponentAt(i); + if(pane.getRoot() == root) + { + return pane; + } + } + return null; } public void removeApplication(IceGridGUI.Application.Root root) { - for(int i = 1; i < getTabCount(); ++i) - { - ApplicationPane pane = (ApplicationPane)getComponentAt(i); - if(pane.getRoot() == root) - { - removeTabAt(i); - break; - } - } + for(int i = 1; i < getTabCount(); ++i) + { + ApplicationPane pane = (ApplicationPane)getComponentAt(i); + if(pane.getRoot() == root) + { + removeTabAt(i); + break; + } + } } MainPane(Coordinator coordinator) { - _coordinator = coordinator; - setBorder(new EmptyBorder(10, 10, 10, 10)); - - addChangeListener(new ChangeListener() - { - public void stateChanged(ChangeEvent evt) - { - Tab tab = (Tab)getSelectedComponent(); - tab.selected(); - } - }); - - _registryIcon = Utils.getIcon("/icons/16x16/registry_bound_application.png"); - _fileIcon = Utils.getIcon("/icons/16x16/file_bound_application.png"); - - addTab("Live Deployment", - Utils.getIcon("/icons/16x16/live_deployment.png"), - _coordinator.getLiveDeploymentPane()); + _coordinator = coordinator; + setBorder(new EmptyBorder(10, 10, 10, 10)); + + addChangeListener(new ChangeListener() + { + public void stateChanged(ChangeEvent evt) + { + Tab tab = (Tab)getSelectedComponent(); + tab.selected(); + } + }); + + _registryIcon = Utils.getIcon("/icons/16x16/registry_bound_application.png"); + _fileIcon = Utils.getIcon("/icons/16x16/file_bound_application.png"); + + addTab("Live Deployment", + Utils.getIcon("/icons/16x16/live_deployment.png"), + _coordinator.getLiveDeploymentPane()); } private String computeTitle(String name) { - String title = name; - int i = 0; - while(hasTitle(title)) - { - title = name + " (" + Integer.toString(++i) + ")"; - } - return title; + String title = name; + int i = 0; + while(hasTitle(title)) + { + title = name + " (" + Integer.toString(++i) + ")"; + } + return title; } private boolean hasTitle(String title) { - int tabCount = getTabCount(); - for(int i = 0; i < tabCount; ++i) - { - if(title.equals(getTitleAt(i))) - { - return true; - } - } - return false; + int tabCount = getTabCount(); + for(int i = 0; i < tabCount; ++i) + { + if(title.equals(getTitleAt(i))) + { + return true; + } + } + return false; } private ImageIcon getIcon(IceGridGUI.Application.Root root) { - if(root.isLive()) - { - return _registryIcon; - } - else if(root.hasFile()) - { - return _fileIcon; - } - else - { - return null; - } + if(root.isLive()) + { + return _registryIcon; + } + else if(root.hasFile()) + { + return _fileIcon; + } + else + { + return null; + } } |