Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2552 - in development/main: depot/station/src/main/net/dpml/depot/prefs metro/composition/unit/src/main/net/dpml/composition/unit

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2552 - in development/main: depot/station/src/main/net/dpml/depot/prefs metro/composition/unit/src/main/net/dpml/composition/unit
  • Date: Fri, 13 May 2005 22:01:51 +0000

Author: mcconnell AT dpml.net
Date: Fri May 13 22:01:35 2005
New Revision: 2552

Modified:

development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesDialog.java

development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandlerControlPanel.java
Log:
metro control panel updates

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesDialog.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesDialog.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesDialog.java
Fri May 13 22:01:35 2005
@@ -98,8 +98,6 @@
*/
private static final int ZERO = 0;

- private List m_listeners = new LinkedList();
-
public DepotPreferencesDialog() throws Exception
{
super();
@@ -189,46 +187,6 @@
}
}

- /**
- * Creation of a panel containing a section in which a name banner is
presented.
- * @param name the name to assign
- * @param view the properties content view
- * @return the panel containing a name header and property content view
- */
- private static JPanel createNamedPanel( final String name, Component
view )
- {
- JPanel panel = createNamedPanel( name );
- JPanel holder = new JPanel( new BorderLayout() );
- holder.add( view, BorderLayout.CENTER );
- panel.add( holder );
- return panel;
- }
-
- /**
- * Create the panel holding a name.
- * @param name the name to assign
- * @return the panel containing the name as a label
- */
- private static JPanel createNamedPanel( final String name )
- {
- JPanel panel = new JPanel();
- panel.setLayout( new BorderLayout() );
-
- //
- // Create the header holding the panel name
- //
-
- JLabel label = new JLabel( name );
- label.setBackground( Color.white );
- label.setBorder( new EmptyBorder( 5, OFFSET, 5, OFFSET ) );
- JPanel labelHolder = new JPanel( new FlowLayout( FlowLayout.LEFT ) );
- labelHolder.add( label );
- labelHolder.setBackground( Color.white );
- panel.add( labelHolder, BorderLayout.NORTH );
-
- return panel;
- }
-
private static class CancelAction extends AbstractAction
{
public CancelAction( String label )

Modified:
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandlerControlPanel.java
==============================================================================
---
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandlerControlPanel.java
(original)
+++
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandlerControlPanel.java
Fri May 13 22:01:35 2005
@@ -34,6 +34,8 @@
import javax.swing.JButton;
import javax.swing.BoxLayout;
import javax.swing.Box;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.TitledBorder;

/**
* A registry of descriptions of plugable content handlers. This
implementation
@@ -51,21 +53,18 @@
super( parent );
setTitle( "Metro FT Content Controller" );
setModal( true );
- JPanel frame = new JPanel();
- frame.setLayout( new BorderLayout() );
- frame.setBackground( Color.white );
- frame.setBorder( new EmptyBorder( 10, 6, 0, 6 ) );
- setContentPane( frame );
+ setBackground( Color.white );

- JLabel label =
- IconHelper.createImageIconJLabel(
- getClass().getClassLoader(), METRO_ICON_FILENAME, "", "DPML
Metro" );
- label.setBorder( new EmptyBorder( 5, 0, 0, 0 ) );
+ // create the header label
+
+ JLabel header = createHeaderLabel();
+
+ // create the body content

- JTabbedPane tabs = new JTabbedPane();
- tabs.setBorder( new EmptyBorder( 0, 10, 10, 10 ) );
- tabs.addTab( "System", new JPanel() );
- tabs.addTab( "Metro", new JPanel() );
+ JPanel body = createBodyContent( this );
+ body.setBorder( new EmptyBorder( 0, 7, 7, 7 ) );
+
+ // create the buttons in the footer

ButtonPanel buttons = new ButtonPanel( this );
buttons.setBorder( new EmptyBorder( 0, 7, 7, 7 ) );
@@ -74,15 +73,55 @@
// package
//

- JPanel holder = new JPanel( new BorderLayout() );
- holder.add( label, BorderLayout.NORTH );
- holder.add( tabs, BorderLayout.CENTER );
- holder.add( buttons, BorderLayout.SOUTH );
+ JPanel assembly = new JPanel( new BorderLayout() );
+ assembly.setBackground( Color.white );
+ assembly.add( header, BorderLayout.NORTH );
+ assembly.add( body, BorderLayout.CENTER );
+ assembly.add( buttons, BorderLayout.SOUTH );
+ setContentPane( assembly );

- setContentPane( holder );
setSize( new Dimension( 400,400 ) );
getRootPane().setDefaultButton( buttons.getDefaultButton() );
+ }

+ private JLabel createHeaderLabel()
+ {
+ JLabel label =
+ IconHelper.createImageIconJLabel(
+ getClass().getClassLoader(), METRO_ICON_FILENAME, "", "Metro
(FT) Content Handler" );
+ label.setBorder( new EmptyBorder( 15, 10, 10, 10 ) );
+ return label;
+ }
+
+ private JPanel createBodyContent( JDialog parent )
+ {
+ JPanel panel = new JPanel( new BorderLayout() );
+ panel.setBackground( Color.white );
+ JPanel stack = createStack();
+ panel.add( stack, BorderLayout.NORTH );
+ return panel;
+ }
+
+ private JPanel createStack()
+ {
+ JPanel stack = new JPanel();
+ stack.setBackground( Color.white );
+ stack.setLayout( new BoxLayout( stack, BoxLayout.Y_AXIS ) );
+ stack.setBorder(
+ new CompoundBorder(
+ new TitledBorder(
+ null, "Plugin", TitledBorder.LEFT, TitledBorder.TOP),
+ new EmptyBorder( 5, 5, 5, 10)
+ )
+ );
+
+ JLabel group = new JLabel( "Group: dpml/tools" );
+ JLabel name = new JLabel( "Name: dpml-composition-unit" );
+ JLabel version = new JLabel( "Version: 123" );
+ stack.add( group );
+ stack.add( name );
+ stack.add( version );
+ return stack;
}

private static class ButtonPanel extends Box
@@ -92,11 +131,13 @@
ButtonPanel( JDialog dialog )
{
super( BoxLayout.Y_AXIS );
+ setBackground( Color.white );

m_close = new JButton( );
Action closeAction = new CancelAction( "Close", dialog );
m_close.setAction( closeAction );
JPanel buttonPanel = new JPanel( new FlowLayout(
FlowLayout.RIGHT ) );
+ buttonPanel.setBackground( Color.white );
buttonPanel.add( m_close );
add( buttonPanel );
}



  • svn commit: r2552 - in development/main: depot/station/src/main/net/dpml/depot/prefs metro/composition/unit/src/main/net/dpml/composition/unit, mcconnell, 05/13/2005

Archive powered by MHonArc 2.6.24.

Top of Page