From: <chr...@us...> - 2006-06-02 20:34:38
|
Revision: 109 Author: christianhujer Date: 2006-06-02 13:34:17 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=109&view=rev Log Message: ----------- Unified C/DSplitPane into Gridarta. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanel.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/CMapArchPanel.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/DSplitPane.java Removed Paths: ------------- trunk/crossfire/src/cfeditor/DSplitPane.java trunk/daimonin/src/daieditor/swing/DSplitPane.java Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-06-02 20:24:44 UTC (rev 108) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-06-02 20:34:17 UTC (rev 109) @@ -37,6 +37,7 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.jetbrains.annotations.Nullable; +import net.sf.gridarta.gui.DSplitPane; /** * The <code>CArchPanel</code> holds the tile palette. Deleted: trunk/crossfire/src/cfeditor/DSplitPane.java =================================================================== --- trunk/crossfire/src/cfeditor/DSplitPane.java 2006-06-02 20:24:44 UTC (rev 108) +++ trunk/crossfire/src/cfeditor/DSplitPane.java 2006-06-02 20:34:17 UTC (rev 109) @@ -1,38 +0,0 @@ -package cfeditor; - -import java.awt.Component; -import javax.swing.JSplitPane; - -/** - * Splitpane subclass that keeps its size even upon L'n'F change. - * @author <a href="mailto:mic...@no...">Michael Toennies</a> - * @author <a href="mailto:and...@gm...">Andreas Vogl</a> - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class DSplitPane extends JSplitPane { - - /** Serial Version UID. */ - private static final long serialVersionUID = 1L; - - /** - * Create a new DSplitPane. - * @param newOrientation {@link JSplitPane#HORIZONTAL_SPLIT} or {@link JSplitPane.VERTICAL_SPLIT}. - * @param newLeftComponent the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane - * @param newRightComponent the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane - */ - public DSplitPane(final int newOrientation, final Component newLeftComponent, final Component newRightComponent) { - super(newOrientation, newLeftComponent, newRightComponent); - setOneTouchExpandable(true); - } - - /** {@inheritDoc} */ - // Overridden to store and restore the divider location upon UI change. - @Override public void updateUI() { - final int dividerLocationBackup = getDividerLocation(); - final int dividerSizeBackup = getDividerSize(); - super.updateUI(); - setDividerLocation(dividerLocationBackup); - setDividerSize(dividerSizeBackup); - } - -} // class DSplitPane Modified: trunk/daimonin/src/daieditor/CMainView.java =================================================================== --- trunk/daimonin/src/daieditor/CMainView.java 2006-06-02 20:24:44 UTC (rev 108) +++ trunk/daimonin/src/daieditor/CMainView.java 2006-06-02 20:34:17 UTC (rev 109) @@ -31,7 +31,7 @@ import daieditor.map.MapControl; import daieditor.map.validation.ErrorCollector; import daieditor.map.validation.ErrorHandler; -import daieditor.swing.DSplitPane; +import net.sf.gridarta.gui.DSplitPane; import java.awt.BorderLayout; import java.awt.Point; import java.awt.Rectangle; Modified: trunk/daimonin/src/daieditor/CMapArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-06-02 20:24:44 UTC (rev 108) +++ trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-06-02 20:34:17 UTC (rev 109) @@ -24,14 +24,12 @@ package daieditor; -import static net.sf.japi.swing.ActionFactory.getFactory; import daieditor.arch.ArchObject; import daieditor.arch.ArchObjectParser; import daieditor.gui.ConnectionView; import daieditor.gui.ErrorListView; import daieditor.map.validation.ErrorCollector; import daieditor.map.validation.ErrorHandler; -import daieditor.swing.DSplitPane; import java.awt.BorderLayout; import static java.awt.Color.black; import static java.awt.Color.blue; @@ -70,7 +68,9 @@ import javax.swing.text.Style; import javax.swing.text.StyleConstants; import javax.swing.text.StyleContext; +import net.sf.gridarta.gui.DSplitPane; import net.sf.japi.swing.ActionFactory; +import static net.sf.japi.swing.ActionFactory.getFactory; /** * <code>CMapArchPanel</code> implements the panel that holds information Deleted: trunk/daimonin/src/daieditor/swing/DSplitPane.java =================================================================== --- trunk/daimonin/src/daieditor/swing/DSplitPane.java 2006-06-02 20:24:44 UTC (rev 108) +++ trunk/daimonin/src/daieditor/swing/DSplitPane.java 2006-06-02 20:34:17 UTC (rev 109) @@ -1,63 +0,0 @@ -/* - * Daimonin Java Editor. - * Copyright (C) 2000 Michael Toennies - * Copyright (C) 2001 Andreas Vogl - * Copyright (C) 2005 Christian Hujer - * - * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - * - */ - -package daieditor.swing; - -import java.awt.Component; -import javax.swing.JSplitPane; - -/** - * Splitpane subclass that keeps its size even upon L'n'F change. - * @author <a href="mailto:mic...@no...">Michael Toennies</a> - * @author <a href="mailto:and...@gm...">Andreas Vogl</a> - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class DSplitPane extends JSplitPane { - - /** Serial Version UID. */ - private static final long serialVersionUID = 1L; - - /** - * Create a new DSplitPane. - * @param newOrientation {@link JSplitPane#HORIZONTAL_SPLIT} or {@link JSplitPane.VERTICAL_SPLIT}. - * @param newLeftComponent the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane - * @param newRightComponent the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane - */ - public DSplitPane(final int newOrientation, final Component newLeftComponent, final Component newRightComponent) { - super(newOrientation, newLeftComponent, newRightComponent); - setOneTouchExpandable(true); - } - - /** {@inheritDoc} */ - // Overridden to store and restore the divider location upon UI change. - @Override public void updateUI() { - final int dividerLocationBackup = getDividerLocation(); - final int dividerSizeBackup = getDividerSize(); - super.updateUI(); - setDividerLocation(dividerLocationBackup); - setDividerSize(dividerSizeBackup); - } - -} // class DSplitPane Copied: trunk/src/app/net/sf/gridarta/gui/DSplitPane.java (from rev 108, trunk/daimonin/src/daieditor/swing/DSplitPane.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/DSplitPane.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/DSplitPane.java 2006-06-02 20:34:17 UTC (rev 109) @@ -0,0 +1,64 @@ +/* + * Gridarta Java Editor. + * Copyright (C) 2000 Michael Toennies + * Copyright (C) 2001 Andreas Vogl + * Copyright (C) 2005 Christian Hujer + * Copyright (C) 2006 The Gridarta Developers + * + * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + */ + +package net.sf.gridarta.gui; + +import java.awt.Component; +import javax.swing.JSplitPane; + +/** + * Splitpane subclass that keeps its size even upon L'n'F change. + * @author <a href="mailto:mic...@no...">Michael Toennies</a> + * @author <a href="mailto:and...@gm...">Andreas Vogl</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class DSplitPane extends JSplitPane { + + /** Serial Version UID. */ + private static final long serialVersionUID = 1L; + + /** + * Create a new DSplitPane. + * @param newOrientation {@link JSplitPane#HORIZONTAL_SPLIT} or {@link JSplitPane.VERTICAL_SPLIT}. + * @param newLeftComponent the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane + * @param newRightComponent the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane + */ + public DSplitPane(final int newOrientation, final Component newLeftComponent, final Component newRightComponent) { + super(newOrientation, newLeftComponent, newRightComponent); + setOneTouchExpandable(true); + } + + /** {@inheritDoc} */ + // Overridden to store and restore the divider location upon UI change. + @Override public void updateUI() { + final int dividerLocationBackup = getDividerLocation(); + final int dividerSizeBackup = getDividerSize(); + super.updateUI(); + setDividerLocation(dividerLocationBackup); + setDividerSize(dividerSizeBackup); + } + +} // class DSplitPane This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |