You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by hi...@apache.org on 2001/11/15 08:54:34 UTC
cvs commit: xml-batik/sources/org/apache/batik/apps/svgbrowser AboutDialog.java
hillion 01/11/14 23:54:34
Modified: sources/org/apache/batik/apps/svgbrowser AboutDialog.java
Log:
Modified dialog layout to avoid clippings on some platforms.
Revision Changes Path
1.6 +14 -21 xml-batik/sources/org/apache/batik/apps/svgbrowser/AboutDialog.java
Index: AboutDialog.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/apps/svgbrowser/AboutDialog.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AboutDialog.java 2001/11/14 13:34:52 1.5
+++ AboutDialog.java 2001/11/15 07:54:34 1.6
@@ -16,6 +16,8 @@
import java.awt.Rectangle;
import java.awt.Color;
+import java.net.URL;
+
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
@@ -26,12 +28,10 @@
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JWindow;
+import javax.swing.SwingConstants;
import javax.swing.border.BevelBorder;
-import org.apache.batik.ext.swing.JGridBagPanel;
-import org.apache.batik.ext.swing.GridBagConstants;
-
import java.awt.event.KeyEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.MouseEvent;
@@ -43,10 +43,9 @@
* The dialog can be dismissed by click or by escaping.
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: AboutDialog.java,v 1.5 2001/11/14 13:34:52 hillion Exp $
+ * @version $Id: AboutDialog.java,v 1.6 2001/11/15 07:54:34 hillion Exp $
*/
-public class AboutDialog extends JWindow
- implements GridBagConstants{
+public class AboutDialog extends JWindow {
public static final String ICON_BATIK_SPLASH
= "AboutDialog.icon.batik.splash";
@@ -120,7 +119,7 @@
* Populates this window
*/
protected void buildGUI(){
- JGridBagPanel panel = new JGridBagPanel();
+ JPanel panel = new JPanel(new BorderLayout(5, 5));
panel.setBackground(Color.white);
ClassLoader cl = this.getClass().getClassLoader();
@@ -129,22 +128,17 @@
// Top is made of the Apache feather, the
// name of the project and URL
//
- JGridBagPanel projectPanel = new JGridBagPanel();
- projectPanel.setBackground(Color.white);
- projectPanel.add(new JLabel(new ImageIcon(cl.getResource(Resources.getString(ICON_APACHE_LOGO)))),
- 0, 0, 1, 1, WEST, NONE, 0, 0);
- projectPanel.add(new JLabel(Resources.getString(LABEL_APACHE_BATIK_PROJECT)),
- 1, 0, 1, 1, WEST, NONE, 0, 0);
- projectPanel.add(new JLabel(""),
- 2, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
-
- panel.add(projectPanel, 0, 0, 1, 1, CENTER, HORIZONTAL, 1, 0);
+ URL url = cl.getResource(Resources.getString(ICON_APACHE_LOGO));
+ JLabel l = new JLabel(Resources.getString(LABEL_APACHE_BATIK_PROJECT),
+ new ImageIcon(url),
+ SwingConstants.LEFT);
+ panel.add(BorderLayout.NORTH, l);
//
// Add splash image
//
- panel.add(new JLabel(new ImageIcon(cl.getResource(Resources.getString(ICON_BATIK_SPLASH)))),
- 0, 1, 1, 1, CENTER, NONE, 0, 0);
+ url = cl.getResource(Resources.getString(ICON_BATIK_SPLASH));
+ panel.add(BorderLayout.CENTER, new JLabel(new ImageIcon(url)));
//
// Add exact revision information
@@ -156,8 +150,7 @@
tagName = Resources.getString(LABEL_DEVELOPMENT_BUILD);
}
- panel.add(new JLabel(tagName),
- 0, 2, 1, 1, EAST, NONE, 0, 0);
+ panel.add(BorderLayout.SOUTH, new JLabel(tagName, SwingConstants.RIGHT));
setBackground(Color.white);
getContentPane().setBackground(Color.white);
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org