diff options
Diffstat (limited to 'javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper')
3 files changed, 27 insertions, 27 deletions
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java index 4fec3cfdb1c5..f6b5977c23e6 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ import javax.swing.UIManager; import org.openoffice.setup.InstallData; public class PanelLabel extends JTextArea { - + static private Color BackgroundColor; static private Color TextColor; static private Font TextFont; @@ -47,36 +47,36 @@ public class PanelLabel extends JTextArea { super(text, rows, columns); init(true); } - + public PanelLabel(String text, boolean multiline) { super(text); init(multiline); } - + public PanelLabel(String text) { super(text); init(false); } - + private void init(boolean multiline) { setEditable(false); setBackground(BackgroundColor); setForeground(TextColor); setFont(TextFont); setFocusable(false); - + InstallData data = InstallData.getInstance(); if ( data.useRtl() ) { setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } - + if (multiline) { setLineWrap(true); setWrapStyleWord(true); } } - + static { BackgroundColor = (Color)UIManager.get("Label.background"); TextColor = (Color)UIManager.get("Label.foreground"); TextFont = ((Font)UIManager.get("Label.font")).deriveFont(Font.PLAIN); - } + } } diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java index 6b383473e541..929a3fc3046b 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,9 +37,9 @@ import javax.swing.JSeparator; import org.openoffice.setup.InstallData; public class PanelTitle extends Box { - + private JLabel TitleLabel; - + public PanelTitle() { super(BoxLayout.PAGE_AXIS); } @@ -53,16 +53,16 @@ public class PanelTitle extends Box { super(BoxLayout.PAGE_AXIS); init(title, subtitle, 0, 0); } - + public PanelTitle(String title) { super (BoxLayout.PAGE_AXIS); init(title, null, 0, 0); } - + public void addVerticalStrut(int strut) { add(createVerticalStrut(strut)); } - + public void setTitle(String title) { TitleLabel.setText(title); } @@ -70,9 +70,9 @@ public class PanelTitle extends Box { // public void setSubtitle(String subtitle) { // SubtitleLabel.setText(subtitle); // } - + private void init(String title, String subtitle, int rows, int columns) { - + InstallData data = InstallData.getInstance(); TitleLabel = new JLabel(title); @@ -85,19 +85,19 @@ public class PanelTitle extends Box { TitlePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); } TitlePanel.add(TitleLabel); - + add(createVerticalStrut(10)); add(TitlePanel); add(createVerticalStrut(10)); add(new JSeparator()); add(createVerticalStrut(20)); - + if (subtitle != null) { PanelLabel SubtitleLabel = null; if ( rows > 0 ) { SubtitleLabel = new PanelLabel(subtitle, rows, columns ); } else { - SubtitleLabel = new PanelLabel(subtitle); + SubtitleLabel = new PanelLabel(subtitle); } SubtitleLabel.setFocusable(false); // PanelLabel SubtitleLabel = new PanelLabel(subtitle, true); @@ -109,7 +109,7 @@ public class PanelTitle extends Box { SubtitlePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); } SubtitlePanel.add(SubtitleLabel); - + add(SubtitlePanel); } } diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java index 7b9253d60ba8..914c6d9cc735 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; public class TreeNodeRenderer extends DefaultTreeCellRenderer { - + ImageIcon InstallIcon; ImageIcon InstalledIcon; ImageIcon DontInstallIcon; @@ -55,12 +55,12 @@ public class TreeNodeRenderer extends DefaultTreeCellRenderer { public Component getTreeCellRendererComponent( JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { - + super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); DefaultMutableTreeNode node = (DefaultMutableTreeNode) value; Object nodeObject = node.getUserObject(); - + if (DisplayPackageDescription.is(nodeObject)) { DisplayPackageDescription nodeInfo = (DisplayPackageDescription)nodeObject; @@ -75,7 +75,7 @@ public class TreeNodeRenderer extends DefaultTreeCellRenderer { default: setIcon(InstalledIcon); break; } } - + if (sel) { setBackground(super.getBackgroundSelectionColor()); setForeground(textSelectionColor); @@ -83,7 +83,7 @@ public class TreeNodeRenderer extends DefaultTreeCellRenderer { setBackground(super.getBackgroundNonSelectionColor()); setForeground(textSelectionColor); } - + return this; } } |