diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-19 14:20:37 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-19 14:20:37 +0000 |
commit | 9ad22aaea5f644fcfa5a397424c358724aa73663 (patch) | |
tree | 1ead90e81aa81d94ea2b46e2b926298abe1d1170 /javainstaller2 | |
parent | 7373d14e5c2456dc284e4690806a89109c617565 (diff) |
CWS-TOOLING: integrate CWS native218
2009-02-05 15:43:50 +0100 is r267429 : #i98921# new jre6u12
2009-02-05 15:43:09 +0100 is r267428 : #i98921# new jre6u12
2009-01-30 12:16:37 +0100 is r267192 : #i98066# new process for different jres for Unix and Windows
2009-01-30 12:14:28 +0100 is r267191 : #i98066# Windows installation sets only get jre6i7 because of broken /qb
2009-01-23 18:12:43 +0100 is r266847 : #159080# fix problem in custom action position
2009-01-23 18:06:48 +0100 is r266845 : #159080# fix problem in custom action position
2009-01-23 18:05:45 +0100 is r266844 : #159080# fix problem in custom action position
2009-01-23 10:55:06 +0100 is r266794 : #158090# adding removere.idt to remove registry entries
2009-01-23 10:54:18 +0100 is r266791 : #158090# adding removere.idt to remove registry entries
2009-01-16 16:58:27 +0100 is r266436 : #158880# preparing msp hotfix after servicepack release
2009-01-16 16:25:00 +0100 is r266431 : #158880# preparing msp hotfix after servicepack release
2009-01-14 16:34:29 +0100 is r266317 : #i52744# rtl support for Java GUI Installer
2009-01-14 12:39:29 +0100 is r266284 : #i98066# jre6u11 for all products
2009-01-14 12:17:59 +0100 is r266279 : #i98062# jre always has to have the same name of the executable
2009-01-13 14:45:59 +0100 is r266224 : #i98026# copyright till 2009
2009-01-13 14:39:11 +0100 is r266223 : #i98026# copyright till 2009
2009-01-13 14:26:51 +0100 is r266221 : #i52744# right to left for windows installer
2009-01-13 11:23:26 +0100 is r266201 : #6777669# default language in nsis has to be English
2009-01-13 11:20:17 +0100 is r266200 : #i98021# using correct syntax for comments
2009-01-12 16:49:36 +0100 is r266168 : #i97715# fixing problem with rpm 4.6
Diffstat (limited to 'javainstaller2')
17 files changed, 157 insertions, 9 deletions
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java index 8f7b6023d102..a4bf1cc7be9a 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java @@ -34,6 +34,7 @@ import org.openoffice.setup.ResourceManager; import org.openoffice.setup.SetupFrame; import org.openoffice.setup.Util.DialogFocusTraversalPolicy; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.Insets; import java.awt.event.ActionListener; @@ -47,6 +48,7 @@ import javax.swing.JSeparator; import javax.swing.JViewport; import javax.swing.ScrollPaneConstants; import javax.swing.border.EmptyBorder; +import org.openoffice.setup.InstallData; public class DetailsDialog extends JDialog implements ActionListener { @@ -58,6 +60,8 @@ public class DetailsDialog extends JDialog implements ActionListener { super(setupFrame.getDialog()); + InstallData data = InstallData.getInstance(); + String dialogTitle = ResourceManager.getString("String_InstallationCompleted_Button"); String dialogText = setupFrame.getCurrentPanel().getDialogText(); @@ -71,18 +75,22 @@ public class DetailsDialog extends JDialog implements ActionListener { JPanel buttonpanel = new JPanel(); buttonpanel.setLayout(new java.awt.FlowLayout()); buttonpanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); + if ( data.useRtl() ) { buttonpanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } //Create an editor pane. JEditorPane editorPane = createEditorPane(dialogText); editorPane.setCaretPosition(0); + if ( data.useRtl() ) { editorPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } JScrollPane editorScrollPane = new JScrollPane(editorPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); editorScrollPane.setPreferredSize(new Dimension(250, 145)); editorScrollPane.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); + if ( data.useRtl() ) { editorScrollPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } JViewport port = editorScrollPane.getViewport(); port.getVisibleRect().setLocation(0,0); + if ( data.useRtl() ) { port.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } editorScrollPane.setViewport(port); // String helpTitle1 = ResourceManager.getString("String_Details_Title_1"); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java index c85a13f92535..f369627ba01a 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java @@ -35,6 +35,7 @@ import org.openoffice.setup.ResourceManager; import org.openoffice.setup.SetupFrame; import org.openoffice.setup.Util.DialogFocusTraversalPolicy; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.Insets; import java.awt.event.ActionListener; @@ -60,6 +61,8 @@ public class HelpDialog extends JDialog implements ActionListener { super(setupFrame.getDialog()); + InstallData data = InstallData.getInstance(); + helpFileString = setupFrame.getCurrentPanel().getHelpFileName(); helpFileName = ResourceManager.getFileName(helpFileString); // String dialogName = setupFrame.getCurrentPanel().getName(); @@ -72,16 +75,19 @@ public class HelpDialog extends JDialog implements ActionListener { JPanel toppanel = new JPanel(); toppanel.setLayout(new java.awt.BorderLayout()); toppanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); + if ( data.useRtl() ) { toppanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } JPanel buttonpanel = new JPanel(); buttonpanel.setLayout(new java.awt.FlowLayout()); buttonpanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); + if ( data.useRtl() ) { buttonpanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } //Create an editor pane. editorPane = createEditorPane(); editorScrollPane = new JScrollPane(editorPane); editorScrollPane.setPreferredSize(new Dimension(250, 145)); editorScrollPane.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); + if ( data.useRtl() ) { editorScrollPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } // String helpTitle1 = null; // InstallData data = InstallData.getInstance(); @@ -99,6 +105,7 @@ public class HelpDialog extends JDialog implements ActionListener { okButton = new JButton(okString); okButton.setEnabled(true); okButton.addActionListener(this); + if ( data.useRtl() ) { okButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } JSeparator separator = new JSeparator(); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java index 760c14763f8d..56c21620a6d5 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java @@ -35,6 +35,7 @@ import org.openoffice.setup.Util.Controller; import org.openoffice.setup.Util.SystemManager; import java.io.File; import java.util.HashMap; +import java.util.Locale; import java.util.Vector; public class InstallData @@ -74,6 +75,7 @@ public class InstallData static private boolean dontUpdate = false; static private boolean hideEula = false; static private boolean databaseQueried = false; + static private boolean useRtl = false; static private String installType; /* custom or typical installation */ static private String osType; /* Linux, SunOS, ... */ static private String installDir = null; @@ -124,6 +126,7 @@ public class InstallData setInstallationMode(); setSolarisUserInstall(); setHtmlFileExistence(); + setBidiSupport(); } public void setInstallationType(String installationtype) { @@ -180,6 +183,14 @@ public class InstallData ResourceManager.checkFileExistence(htmlDirectory); } + private void setBidiSupport() { + Locale locale = Locale.getDefault(); + if (( locale.getLanguage().equals(new Locale("he", "", "").getLanguage()) ) + || ( locale.getLanguage().equals(new Locale("ar", "", "").getLanguage()) )) { + useRtl = true; + } + } + private void setInstallationPrivileges(boolean isUserInstallation) { if ( isUserInstallation ) { installationPrivileges = "user"; @@ -259,6 +270,10 @@ public class InstallData return isSolarisUserInstallation; } + public boolean useRtl() { + return useRtl; + } + public String getDefaultDir() { return defaultDir; } diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java index 3cc7800d7637..d7e50f09680f 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java @@ -37,6 +37,7 @@ import org.openoffice.setup.ResourceManager; import org.openoffice.setup.SetupData.DisplayPackageDescription; import org.openoffice.setup.SetupData.SetupDataProvider; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Insets; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; @@ -54,6 +55,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; +import org.openoffice.setup.InstallData; public class ChooseComponents extends JPanel implements MouseListener, KeyListener, TreeSelectionListener { @@ -66,6 +68,8 @@ public class ChooseComponents extends JPanel implements MouseListener, KeyListen public ChooseComponents() { + InstallData data = InstallData.getInstance(); + setLayout(new BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -86,6 +90,7 @@ public class ChooseComponents extends JPanel implements MouseListener, KeyListen componentTree.addKeyListener( this ); componentTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); componentTree.addTreeSelectionListener(this); + // if ( data.useRtl() ) { componentTree.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String BorderTitle = ResourceManager.getString("String_ChooseComponents3"); TitledBorder PanelBorder = BorderFactory.createTitledBorder(BorderTitle); @@ -103,6 +108,7 @@ public class ChooseComponents extends JPanel implements MouseListener, KeyListen DescriptionPanel.add(descriptionLabel, BorderLayout.CENTER); DescriptionPanel.add(sizeLabel, BorderLayout.EAST); + if ( data.useRtl() ) { DescriptionPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } add(new JScrollPane(componentTree), BorderLayout.CENTER); add(DescriptionPanel, BorderLayout.SOUTH); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java index ca7daba8e18f..351b0b3bddba 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java @@ -35,6 +35,7 @@ import org.openoffice.setup.PanelHelper.PanelLabel; import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; @@ -45,6 +46,7 @@ import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; +import org.openoffice.setup.InstallData; public class ChooseInstallationType extends JPanel { @@ -53,6 +55,8 @@ public class ChooseInstallationType extends JPanel { public ChooseInstallationType() { + InstallData data = InstallData.getInstance(); + setLayout(new BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -60,6 +64,9 @@ public class ChooseInstallationType extends JPanel { String subtitleText = ResourceManager.getString("String_ChooseInstallationType2"); PanelTitle titleBox = new PanelTitle(titleText, subtitleText); titleBox.addVerticalStrut(20); + + if ( data.useRtl() ) { titleBox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } + add(titleBox, BorderLayout.NORTH); String borderTitle = ResourceManager.getString("String_ChooseInstallationType3"); @@ -68,6 +75,7 @@ public class ChooseInstallationType extends JPanel { JPanel contentPanel = new JPanel(); contentPanel.setBorder(PanelBorder); contentPanel.setLayout(new GridBagLayout()); + if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } GridBagConstraints constraints = new GridBagConstraints(); constraints.insets = new Insets(0, 0, 0, 10); @@ -75,17 +83,22 @@ public class ChooseInstallationType extends JPanel { String typicalText = ResourceManager.getString("String_ChooseInstallationType4"); PanelLabel typicalComment = new PanelLabel(typicalText, true); + if ( data.useRtl() ) { typicalComment.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String customText = ResourceManager.getString("String_ChooseInstallationType5"); PanelLabel customComment = new PanelLabel(customText, true); + if ( data.useRtl() ) { customComment.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } ButtonGroup group = new ButtonGroup(); String typicalButtonText = ResourceManager.getString("String_ChooseInstallationType6"); typical = new JRadioButton(typicalButtonText, true); typical.setMnemonic(KeyEvent.VK_C); + if ( data.useRtl() ) { typical.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } + String customButtonText = ResourceManager.getString("String_ChooseInstallationType7"); custom = new JRadioButton(customButtonText, false); custom.setMnemonic(KeyEvent.VK_U); + if ( data.useRtl() ) { custom.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } group.add(typical); group.add(custom); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java index 5f5969dd1cb0..4bff1b209355 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java @@ -37,6 +37,7 @@ import org.openoffice.setup.ResourceManager; import org.openoffice.setup.SetupData.DisplayPackageDescription; import org.openoffice.setup.SetupData.SetupDataProvider; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Insets; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; @@ -54,6 +55,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; +import org.openoffice.setup.InstallData; public class ChooseUninstallationComponents extends JPanel implements MouseListener, KeyListener, TreeSelectionListener { @@ -66,6 +68,8 @@ public class ChooseUninstallationComponents extends JPanel implements MouseListe public ChooseUninstallationComponents() { + InstallData data = InstallData.getInstance(); + setLayout(new BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -87,6 +91,7 @@ public class ChooseUninstallationComponents extends JPanel implements MouseListe componentTree.addKeyListener( this ); componentTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); componentTree.addTreeSelectionListener(this); + // if ( data.useRtl() ) { componentTree.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String BorderTitle = ResourceManager.getString("String_ChooseComponents3"); TitledBorder PanelBorder = BorderFactory.createTitledBorder(BorderTitle); @@ -101,9 +106,11 @@ public class ChooseUninstallationComponents extends JPanel implements MouseListe descriptionLabel = new PanelLabel(DescriptionText, 3, 20); sizeString = ResourceManager.getString("String_ChooseComponents4"); sizeLabel = new PanelLabel(sizeString, 1, 5); + if ( data.useRtl() ) { descriptionLabel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } DescriptionPanel.add(descriptionLabel, BorderLayout.CENTER); DescriptionPanel.add(sizeLabel, BorderLayout.EAST); + if ( data.useRtl() ) { DescriptionPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } add(new JScrollPane(componentTree), BorderLayout.CENTER); add(DescriptionPanel, BorderLayout.SOUTH); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java index d9d044ad8f45..62be2ade768b 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java @@ -35,6 +35,7 @@ import org.openoffice.setup.PanelHelper.PanelLabel; import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; @@ -45,6 +46,7 @@ import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; +import org.openoffice.setup.InstallData; public class ChooseUninstallationType extends JPanel { @@ -53,6 +55,8 @@ public class ChooseUninstallationType extends JPanel { public ChooseUninstallationType() { + InstallData data = InstallData.getInstance(); + setLayout(new BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -68,6 +72,7 @@ public class ChooseUninstallationType extends JPanel { JPanel contentPanel = new JPanel(); contentPanel.setBorder(PanelBorder); contentPanel.setLayout(new GridBagLayout()); + if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } GridBagConstraints constraints = new GridBagConstraints(); constraints.insets = new Insets(0, 0, 0, 10); @@ -75,17 +80,21 @@ public class ChooseUninstallationType extends JPanel { String completeText = ResourceManager.getString("String_ChooseUninstallationType4"); PanelLabel completeComment = new PanelLabel(completeText, true); + if ( data.useRtl() ) { completeComment.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String customText = ResourceManager.getString("String_ChooseUninstallationType5"); PanelLabel customComment = new PanelLabel(customText, true); + if ( data.useRtl() ) { customComment.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } ButtonGroup group = new ButtonGroup(); String completeButtonText = ResourceManager.getString("String_ChooseUninstallationType6"); complete = new JRadioButton(completeButtonText, true); complete.setMnemonic(KeyEvent.VK_C); + if ( data.useRtl() ) { complete.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String customButtonText = ResourceManager.getString("String_ChooseUninstallationType3"); custom = new JRadioButton(customButtonText, false); custom.setMnemonic(KeyEvent.VK_U); + if ( data.useRtl() ) { custom.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } group.add(complete); group.add(custom); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java index 7cb8d8db70cf..bb293e6b0028 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java @@ -34,15 +34,15 @@ import org.openoffice.setup.PanelHelper.PanelLabel; import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.Insets; -import java.awt.Point; import javax.swing.JEditorPane; import javax.swing.JPanel; import javax.swing.JScrollBar; import javax.swing.JScrollPane; -import javax.swing.JViewport; import javax.swing.border.EmptyBorder; +import org.openoffice.setup.InstallData; public class InstallationImminent extends JPanel { @@ -52,6 +52,9 @@ public class InstallationImminent extends JPanel { private PanelTitle titlebox; public InstallationImminent() { + + InstallData data = InstallData.getInstance(); + setLayout(new java.awt.BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -61,16 +64,20 @@ public class InstallationImminent extends JPanel { JPanel contentpanel = new JPanel(); contentpanel.setLayout(new java.awt.BorderLayout()); + if ( data.useRtl() ) { contentpanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String text1 = ResourceManager.getString("String_InstallationImminent2"); PanelLabel label1 = new PanelLabel(text1); + if ( data.useRtl() ) { label1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } ProductInformation = new JEditorPane("text/html", getInfoText()); ProductInformation.setEditable(false); + if ( data.useRtl() ) { ProductInformation.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } ProductPane = new JScrollPane(ProductInformation); ProductPane.setPreferredSize(new Dimension(250, 145)); ProductPane.setBorder(new EmptyBorder(10, 0, 10, 0)); + if ( data.useRtl() ) { ProductPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } contentpanel.add(label1, BorderLayout.NORTH); contentpanel.add(ProductPane, BorderLayout.CENTER); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java index 9b609daf559e..42fda2d0bbfb 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java @@ -35,6 +35,7 @@ import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import org.openoffice.setup.SetupActionListener; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Container; import java.awt.Insets; import javax.swing.Box; @@ -42,6 +43,7 @@ import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.border.EmptyBorder; +import org.openoffice.setup.InstallData; public class InstallationOngoing extends JPanel { @@ -53,6 +55,8 @@ public class InstallationOngoing extends JPanel { public InstallationOngoing() { + InstallData data = InstallData.getInstance(); + setLayout(new java.awt.BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -64,18 +68,21 @@ public class InstallationOngoing extends JPanel { add(mTitlebox, BorderLayout.NORTH); Container contentbox = Box.createVerticalBox(); + if ( data.useRtl() ) { contentbox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } // String progressText = ResourceManager.getString("String_InstallationOngoing2"); String progressText = ""; currentProgress = new PanelLabel(progressText); Container innerbox = Box.createHorizontalBox(); - + if ( data.useRtl() ) { innerbox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } progressBar = new JProgressBar(0, 100); + if ( data.useRtl() ) { progressBar.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } mStopButton = new JButton(); String progressButtonText = ResourceManager.getString("String_InstallationOngoing3"); mStopButton.setText(progressButtonText); mStopButton.setEnabled(true); + if ( data.useRtl() ) { mStopButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } innerbox.add(progressBar); innerbox.add(Box.createHorizontalStrut(10)); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java index 7cf1801c502f..005c5c6a1530 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java @@ -35,6 +35,7 @@ import org.openoffice.setup.PanelHelper.PanelLabel; import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Insets; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; @@ -43,11 +44,14 @@ public class Prologue extends JPanel { public Prologue() { + InstallData data = InstallData.getInstance(); + setLayout(new java.awt.BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); - String titleText = ResourceManager.getString("String_Prologue1"); + String titleText = ResourceManager.getString("String_Prologue1"); PanelTitle titleBox = new PanelTitle(titleText); + if ( data.useRtl() ) { titleBox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } add(titleBox, BorderLayout.NORTH); JPanel contentPanel = new JPanel(); @@ -55,17 +59,18 @@ public class Prologue extends JPanel { String text1 = ResourceManager.getString("String_Prologue2"); PanelLabel label1 = new PanelLabel(text1, true); + if ( data.useRtl() ) { label1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String text2 = ResourceManager.getString("String_Prologue3"); PanelLabel label2 = new PanelLabel(text2); + if ( data.useRtl() ) { label2.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } contentPanel.add(label1, BorderLayout.NORTH); contentPanel.add(label2, BorderLayout.CENTER); - InstallData data = InstallData.getInstance(); - if ( data.isUserInstallation() ) { String text3 = ResourceManager.getString("String_Prologue4"); PanelLabel label3 = new PanelLabel(text3, true); + if ( data.useRtl() ) { label3.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } contentPanel.add(label3, BorderLayout.SOUTH); } diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java index f1aa04422e6f..61b0dc9fa7ab 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java @@ -35,11 +35,13 @@ import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import org.openoffice.setup.SetupActionListener; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.Insets; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; +import org.openoffice.setup.InstallData; public class UninstallationCompleted extends JPanel { @@ -51,6 +53,8 @@ public class UninstallationCompleted extends JPanel { public UninstallationCompleted() { + InstallData data = InstallData.getInstance(); + setLayout(new java.awt.BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -60,22 +64,26 @@ public class UninstallationCompleted extends JPanel { JPanel contentPanel = new JPanel(); contentPanel.setLayout(new java.awt.BorderLayout()); + if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String dialogText = ResourceManager.getString("String_UninstallationCompleted2"); varLabel = new PanelLabel(dialogText, true); String text2 = ResourceManager.getString("String_InstallationCompleted3"); PanelLabel label2 = new PanelLabel(text2); + if ( data.useRtl() ) { label2.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } mDetailsButton = new JButton(); String buttonText = ResourceManager.getString("String_InstallationCompleted_Button"); mDetailsButton.setText(buttonText); mDetailsButton.setEnabled(true); + if ( data.useRtl() ) { mDetailsButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } JPanel ButtonPanel = new JPanel(); ButtonPanel.setLayout(new BorderLayout()); ButtonPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); ButtonPanel.setPreferredSize(new Dimension(120, 44)); ButtonPanel.add(mDetailsButton, BorderLayout.NORTH); + if ( data.useRtl() ) { ButtonPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } contentPanel.add(varLabel, BorderLayout.NORTH); contentPanel.add(ButtonPanel, BorderLayout.EAST); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java index b658ffcec253..255aa8f0acb9 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java @@ -34,6 +34,7 @@ import org.openoffice.setup.PanelHelper.PanelLabel; import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.Insets; import javax.swing.JEditorPane; @@ -41,6 +42,7 @@ import javax.swing.JPanel; import javax.swing.JScrollBar; import javax.swing.JScrollPane; import javax.swing.border.EmptyBorder; +import org.openoffice.setup.InstallData; public class UninstallationImminent extends JPanel { @@ -49,6 +51,9 @@ public class UninstallationImminent extends JPanel { private JScrollPane ProductPane; public UninstallationImminent() { + + InstallData data = InstallData.getInstance(); + setLayout(new java.awt.BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -58,16 +63,20 @@ public class UninstallationImminent extends JPanel { JPanel contentpanel = new JPanel(); contentpanel.setLayout(new java.awt.BorderLayout()); + if ( data.useRtl() ) { contentpanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String text1 = ResourceManager.getString("String_UninstallationImminent2"); PanelLabel label1 = new PanelLabel(text1); + if ( data.useRtl() ) { label1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } ProductInformation = new JEditorPane("text/html", getInfoText()); ProductInformation.setEditable(false); + if ( data.useRtl() ) { ProductInformation.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } ProductPane = new JScrollPane(ProductInformation); ProductPane.setPreferredSize(new Dimension(250, 145)); ProductPane.setBorder(new EmptyBorder(10, 0, 10, 0)); + if ( data.useRtl() ) { ProductPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } contentpanel.add(label1, BorderLayout.NORTH); contentpanel.add(ProductPane, BorderLayout.CENTER); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java index 81d211f8a91f..225a0e202a36 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java @@ -35,6 +35,7 @@ import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import org.openoffice.setup.SetupActionListener; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Container; import java.awt.Insets; import javax.swing.Box; @@ -42,6 +43,7 @@ import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.border.EmptyBorder; +import org.openoffice.setup.InstallData; public class UninstallationOngoing extends JPanel { @@ -51,6 +53,8 @@ public class UninstallationOngoing extends JPanel { public UninstallationOngoing() { + InstallData data = InstallData.getInstance(); + setLayout(new java.awt.BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -60,15 +64,19 @@ public class UninstallationOngoing extends JPanel { add(titlebox, BorderLayout.NORTH); Container contentbox = Box.createVerticalBox(); + if ( data.useRtl() ) { contentbox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } // String progressText = ResourceManager.getString("String_UninstallationOngoing2"); String progressText = ""; currentProgress = new PanelLabel(progressText); Container innerbox = Box.createHorizontalBox(); + if ( data.useRtl() ) { innerbox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } progressBar = new JProgressBar(0, 100); + if ( data.useRtl() ) { progressBar.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } mStopButton = new JButton(); + if ( data.useRtl() ) { mStopButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String progressButtonText = ResourceManager.getString("String_InstallationOngoing3"); mStopButton.setText(progressButtonText); mStopButton.setEnabled(true); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java index 255f0501c372..b19d4797b67d 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java @@ -35,11 +35,13 @@ import org.openoffice.setup.PanelHelper.PanelTitle; import org.openoffice.setup.ResourceManager; import org.openoffice.setup.SetupActionListener; import java.awt.BorderLayout; +import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.Insets; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; +import org.openoffice.setup.InstallData; public class installationCompleted extends JPanel { @@ -51,6 +53,8 @@ public class installationCompleted extends JPanel { public installationCompleted() { + InstallData data = InstallData.getInstance(); + setLayout(new java.awt.BorderLayout()); setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); @@ -60,22 +64,26 @@ public class installationCompleted extends JPanel { JPanel contentPanel = new JPanel(); contentPanel.setLayout(new java.awt.BorderLayout()); + if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } String dialogText = ResourceManager.getString("String_InstallationCompleted2"); varLabel = new PanelLabel(dialogText, true); String text2 = ResourceManager.getString("String_InstallationCompleted3"); PanelLabel label2 = new PanelLabel(text2); + if ( data.useRtl() ) { label2.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } mDetailsButton = new JButton(); String buttonText = ResourceManager.getString("String_InstallationCompleted_Button"); mDetailsButton.setText(buttonText); mDetailsButton.setEnabled(true); + if ( data.useRtl() ) { mDetailsButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } JPanel ButtonPanel = new JPanel(); ButtonPanel.setLayout(new BorderLayout()); ButtonPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); ButtonPanel.setPreferredSize(new Dimension(120, 44)); ButtonPanel.add(mDetailsButton, BorderLayout.NORTH); + if ( data.useRtl() ) { ButtonPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } contentPanel.add(varLabel, BorderLayout.NORTH); contentPanel.add(ButtonPanel, BorderLayout.EAST); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java index 005eda62a7f9..d2dcfb078b87 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java @@ -31,9 +31,11 @@ package org.openoffice.setup.PanelHelper; import java.awt.Color; +import java.awt.ComponentOrientation; import java.awt.Font; import javax.swing.JTextArea; import javax.swing.UIManager; +import org.openoffice.setup.InstallData; public class PanelLabel extends JTextArea { @@ -66,6 +68,9 @@ public class PanelLabel extends JTextArea { setFont(TextFont); setFocusable(false); + InstallData data = InstallData.getInstance(); + if ( data.useRtl() ) { setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } + if (multiline) { setLineWrap(true); setWrapStyleWord(true); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java index 9b59bd3206ed..79f3d71bfc83 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java @@ -30,12 +30,14 @@ package org.openoffice.setup.PanelHelper; +import java.awt.ComponentOrientation; import java.awt.FlowLayout; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSeparator; +import org.openoffice.setup.InstallData; public class PanelTitle extends Box { @@ -74,10 +76,17 @@ public class PanelTitle extends Box { private void init(String title, String subtitle, int rows, int columns) { + InstallData data = InstallData.getInstance(); + TitleLabel = new JLabel(title); TitleLabel.setFocusable(false); JPanel TitlePanel = new JPanel(); - TitlePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + if ( data.useRtl() ) { + TitlePanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); + TitleLabel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); + } else { + TitlePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + } TitlePanel.add(TitleLabel); add(createVerticalStrut(10)); @@ -96,7 +105,12 @@ public class PanelTitle extends Box { SubtitleLabel.setFocusable(false); // PanelLabel SubtitleLabel = new PanelLabel(subtitle, true); JPanel SubtitlePanel = new JPanel(); - SubtitlePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + if ( data.useRtl() ) { + SubtitlePanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); + SubtitleLabel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); + } else { + SubtitlePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + } SubtitlePanel.add(SubtitleLabel); add(SubtitlePanel); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java index aecc6300a915..eed383d559c7 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java @@ -29,9 +29,9 @@ ************************************************************************/ package org.openoffice.setup; -import org.openoffice.setup.Util.SystemManager; import java.awt.BorderLayout; import java.awt.CardLayout; +import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.Insets; import java.awt.event.WindowAdapter; @@ -258,6 +258,15 @@ public class SetupFrame extends WindowAdapter { mCancelButton.addActionListener(mActionListener); mHelpButton.addActionListener(mActionListener); + InstallData data = InstallData.getInstance(); + + if (data.useRtl()) { + mPreviousButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); + mNextButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); + mCancelButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); + mHelpButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); + } + Box ButtonBox = new Box(BoxLayout.X_AXIS); ButtonBox.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); ButtonBox.add(mPreviousButton); @@ -267,6 +276,9 @@ public class SetupFrame extends WindowAdapter { ButtonBox.add(mCancelButton); ButtonBox.add(Box.createHorizontalStrut(10)); ButtonBox.add(mHelpButton); + if (data.useRtl()) { + ButtonBox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); + } JPanel ButtonPanel = new JPanel(); JSeparator Separator = new JSeparator(); |