Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2527 - in development/main: depot/content/src/main/net/dpml/depot/content 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: r2527 - in development/main: depot/content/src/main/net/dpml/depot/content depot/station/src/main/net/dpml/depot/prefs metro/composition/unit/src/main/net/dpml/composition/unit
  • Date: Thu, 12 May 2005 14:28:10 +0000

Author: mcconnell AT dpml.net
Date: Thu May 12 14:28:07 2005
New Revision: 2527

Added:

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

development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandlerControlPanel.java
Removed:

development/main/depot/content/src/main/net/dpml/depot/content/DepotContentHandlerRegistryControlPanel.java
Modified:

development/main/depot/content/src/main/net/dpml/depot/content/DepotContentHandlerRegistryInstaller.java

development/main/depot/station/src/main/net/dpml/depot/prefs/ContentHandlerMainPanel.java
Log:
Add a control panel to the composition unit sub-project for integration of
default metro FT preferences into the Depot manager.

Modified:
development/main/depot/content/src/main/net/dpml/depot/content/DepotContentHandlerRegistryInstaller.java
==============================================================================
---
development/main/depot/content/src/main/net/dpml/depot/content/DepotContentHandlerRegistryInstaller.java
(original)
+++
development/main/depot/content/src/main/net/dpml/depot/content/DepotContentHandlerRegistryInstaller.java
Thu May 12 14:28:07 2005
@@ -31,7 +31,7 @@
public DepotContentHandlerRegistryInstaller()
{
System.out.println( "#INSTALLING " +
DepotContentHandlerRegistryInstaller.class.getName() );
- Preferences prefs = Preferences.systemNodeForPackage(
ContentHandlerRegistry.class );
+ Preferences prefs = Preferences.userNodeForPackage(
ContentHandlerRegistry.class );
Preferences p = prefs.node( "part" );
p.put( "title", "Part Content Handler" );
p.put( "uri",
"artifact:plugin:dpml/tools/dpml-composition-unit#SNAPSHOT" );

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/ContentHandlerMainPanel.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/ContentHandlerMainPanel.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/ContentHandlerMainPanel.java
Thu May 12 14:28:07 2005
@@ -85,7 +85,9 @@
private JButton m_edit;
private JButton m_delete;

- private String m_selection; // selected hostname
+ private String m_selection;
+
+ private Preferences m_preferences;

//--------------------------------------------------------------
// constructor
@@ -112,6 +114,7 @@
ContentHandlerMainPanel.setBorder( new CompoundBorder( tb, border5 )
);

Preferences prefs = Preferences.userNodeForPackage(
ContentHandlerRegistry.class );
+ m_preferences = prefs;
TableColumnModel columns = createContentHandlerColumnModel();
NodeTableModel model = new NodeTableModel( prefs );
m_table = new GenericTable( model, columns );
@@ -282,29 +285,49 @@
return;
}

- /*
+
try
{
JDialog dialog = new JDialog( m_parent, true );
- dialog.setTitle( "Resource Host: " + name );
- JPanel panel = new HostPanel( dialog, name );
+ dialog.setTitle( "Content Handler" );
+ Dimension size = new Dimension( 400, 240 );
+
+ JPanel frame = new JPanel();
+ frame.setLayout( new BorderLayout() );
+ frame.setBackground( Color.white );
+ frame.setBorder( new EmptyBorder( 10, 6, 0, 6 ) );
+
+ Preferences node = m_preferences.node( name );
+ JPanel panel = new ContentHandlerPanel( dialog, node );
+ frame.add( panel, BorderLayout.CENTER );
+ dialog.setContentPane( frame );
+ dialog.setSize( size );
+ dialog.setLocationRelativeTo( (Component) event.getSource()
);
+ dialog.setResizable( true );
+ dialog.setVisible(true);
+
+ /*
+ JDialog dialog = new JDialog( m_parent, true );
+ Preferences node = m_preferences.node( name );
+ dialog.setTitle( "Content Handler: " + name );
+ JPanel panel = new ContentHandlerPanel( dialog, node );
dialog.setContentPane( panel );
Dimension size = new Dimension( 400, 360 );
dialog.setSize( size );
dialog.setLocationRelativeTo( (Component) event.getSource()
);
dialog.setResizable( true );
dialog.setVisible( true );
+ */
}
catch( Throwable e )
{
final String error =
- "Unexpected error while attempting to construct host
dialog."
+ "Unexpected error while attempting to construct plugin
dialog."
+ "\nCODEBASE: "
+
getClass().getProtectionDomain().getCodeSource().getLocation().toString();
String message = ExceptionHelper.packException( error, e,
true );
System.out.println( message );
}
- */
}
}

@@ -318,29 +341,48 @@

public void actionPerformed( ActionEvent event )
{
- /*
try
{
JDialog dialog = new JDialog( m_parent, true );
+ dialog.setTitle( "Content Handler" );
+ Dimension size = new Dimension( 400, 240 );
+
+ JPanel frame = new JPanel();
+ frame.setLayout( new BorderLayout() );
+ frame.setBackground( Color.white );
+ frame.setBorder( new EmptyBorder( 10, 6, 0, 6 ) );
+
+ Preferences node = m_preferences.node( m_selection );
+ JPanel panel = new ContentHandlerPanel( dialog, node );
+ frame.add( panel, BorderLayout.CENTER );
+ dialog.setContentPane( frame );
+ dialog.setSize( size );
+ dialog.setLocationRelativeTo( (Component) event.getSource()
);
+ dialog.setResizable( true );
+ dialog.setVisible(true);
+
+ /*
+ JDialog dialog = new JDialog( m_parent, true );
dialog.setTitle( "Resource Host: " + m_selection );
- JPanel panel = new HostPanel( dialog, m_selection );
+ Preferences node = m_preferences.node( m_selection );
+ JPanel panel = new ContentHandlerPanel( dialog, node );
dialog.setContentPane( panel );
Dimension size = new Dimension( 400, 360 );
dialog.setSize( size );
dialog.setLocationRelativeTo( (Component) event.getSource()
);
dialog.setResizable( true );
dialog.setVisible( true );
+ */
}
catch( Throwable e )
{
final String error =
- "Unexpected error while attempting to construct host
dialog."
+ "Unexpected error while attempting to construct content
handler plugin dialog."
+ "\nCODEBASE: "
+
getClass().getProtectionDomain().getCodeSource().getLocation().toString();
String message = ExceptionHelper.packException( error, e,
true );
System.out.println( message );
}
- */
}
}

@@ -358,23 +400,21 @@
{
return;
}
- /*
- Preferences hosts = Preferences.userNodeForPackage(
ResourceHost.class );
- Preferences target = hosts.node( m_selection );
+
try
{
- target.removeNode();
+ Preferences node = m_preferences.node( m_selection );
+ node.removeNode();
}
catch( Throwable e )
{
final String error =
- "Unexpected error while attempting to delete a host
preferences node."
+ "Unexpected error while attempting to delete a content
handler plugin preferences node."
+ "\nCODEBASE: "
+
getClass().getProtectionDomain().getCodeSource().getLocation().toString();
String message = ExceptionHelper.packException( error, e,
true );
System.out.println( message );
}
- */
}
}


Added:
development/main/depot/station/src/main/net/dpml/depot/prefs/ContentHandlerPanel.java
==============================================================================
--- (empty file)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/ContentHandlerPanel.java
Thu May 12 14:28:07 2005
@@ -0,0 +1,554 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.depot.prefs;
+
+import java.io.IOException;
+import java.awt.Color;
+import java.awt.Dialog;
+import java.awt.Dimension;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import java.awt.FlowLayout;
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Insets;
+import java.net.URI;
+import java.net.URL;
+import java.net.ContentHandler;
+import java.net.URISyntaxException;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Map;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.prefs.Preferences;
+import java.util.prefs.PreferenceChangeListener;
+import java.util.prefs.PreferenceChangeEvent;
+
+import javax.swing.Action;
+import javax.swing.AbstractAction;
+import javax.swing.BoxLayout;
+import javax.swing.JDialog;
+import javax.swing.JTable;
+import javax.swing.JScrollPane;
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JLabel;
+import javax.swing.JTextField;
+import javax.swing.JOptionPane;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.table.TableColumnModel;
+import javax.swing.table.TableColumn;
+import javax.swing.table.DefaultTableColumnModel;
+import javax.swing.JFileChooser;
+
+import net.dpml.transit.Transit;
+import net.dpml.transit.TransitException;
+import net.dpml.transit.util.ExceptionHelper;
+import net.dpml.transit.content.ContentHandlerRegistry;
+import net.dpml.transit.repository.Plugin;
+
+/**
+ * Control panel for editing the cache preferences.
+ *
+ * @author <a href="mailto:mcconnell AT osm.net";>OSM</a>
+ */
+public class ContentHandlerPanel extends JPanel implements
PreferenceChangeListener, PropertyChangeListener, DocumentListener
+{
+ //--------------------------------------------------------------
+ // static
+ //--------------------------------------------------------------
+
+ static EmptyBorder border5 = new EmptyBorder( 5, 5, 5, 5);
+
+ //--------------------------------------------------------------
+ // state
+ //--------------------------------------------------------------
+
+ private final JDialog m_parent;
+ private JTextField m_base;
+ private JButton m_ok;
+ private JButton m_revert;
+ private SettingsAction m_settings;
+
+ private Preferences m_preferences;
+
+ private PropertyChangeSupport m_propertyChangeSupport;
+
+ //--------------------------------------------------------------
+ // constructor
+ //--------------------------------------------------------------
+
+ public ContentHandlerPanel( JDialog parent, Preferences prefs ) throws
Exception
+ {
+ m_parent = parent;
+ m_propertyChangeSupport = new PropertyChangeSupport( this );
+
+ m_preferences = prefs;
+
+ setLayout( new BorderLayout() );
+ setBackground( Color.white );
+
+ m_ok = new JButton( new OKAction( "Install", ContentHandler.class )
);
+ m_revert = new JButton( new RevertAction( "Undo" ) );
+ m_preferences.addPreferenceChangeListener( this );
+
+ // create a label containing an icon and label
+
+ {
+ JLabel label =
+ IconHelper.createImageIconJLabel(
+ getClass().getClassLoader(),
"net/dpml/transit/images/source.png", "URI", "Controller URI" );
+ label.setBorder( new EmptyBorder( 0, 5, 0, 0 ) );
+ JPanel panel = new JPanel();
+ panel.setLayout( new BorderLayout() );
+ panel.setBackground( Color.white );
+ panel.add( label, BorderLayout.WEST );
+ add( panel, BorderLayout.NORTH );
+ }
+
+ // add a test field containing the content handler artifact uri and
a
+ // button for optional controller configuration
+
+ {
+ JPanel holder = new JPanel();
+ holder.setBackground( Color.white );
+ holder.setLayout( new BorderLayout() );
+
+ JPanel panel = new JPanel();
+ panel.setLayout( new BoxLayout( panel, BoxLayout.Y_AXIS ) );
+ panel.setBackground( Color.white );
+ panel.setBorder( new EmptyBorder( 10, 10, 10, 10 ) );
+ {
+ // add the text field
+
+ JPanel padding = new JPanel();
+ padding.setBackground( Color.white );
+ padding.setLayout( new BorderLayout() );
+ padding.setBorder( new EmptyBorder( 10, 2, 5, 2) );
+ String artifact = getControllerFieldTextFromPreferences();
+ m_base = new JTextField( artifact );
+ m_base.getDocument().addDocumentListener( this ); // listen
for changes
+ m_base.setBackground( Color.white );
+ padding.add( m_base );
+ panel.add( padding );
+ }
+ {
+ // add the optional controller settings button
+
+ JPanel settingsPanel = new JPanel();
+ settingsPanel.setBorder(
+ new CompoundBorder(
+ new TitledBorder(
+ null, "Controller Settings", TitledBorder.LEFT,
TitledBorder.TOP),
+ new EmptyBorder( 5, 5, 5, 10)
+ )
+ );
+ settingsPanel.setBackground( Color.white );
+ settingsPanel.setLayout( new BorderLayout() );
+ m_settings = new SettingsAction( "Controller Settings",
m_parent );
+ JButton settings = new JButton( m_settings );
+ settingsPanel.add( settings, BorderLayout.EAST );
+ panel.add( settingsPanel );
+ }
+ holder.add( panel, BorderLayout.NORTH );
+ add( holder, BorderLayout.CENTER );
+ }
+
+ // add revert, ok, and cancel
+
+ {
+ JPanel panel = new JPanel();
+ panel.setLayout( new FlowLayout( FlowLayout.RIGHT ) );
+ panel.add( m_revert );
+ panel.add( m_ok );
+ panel.add( new JButton( new CloseAction( "Cancel" ) ) );
+ panel.setBorder( new EmptyBorder( 10, 10, 5, 0 ) );
+ panel.setBackground( Color.white );
+ add( panel, BorderLayout.SOUTH );
+ }
+
+ m_propertyChangeSupport.addPropertyChangeListener( this );
+ }
+
+ //--------------------------------------------------------------
+ // DocumentListener
+ //--------------------------------------------------------------
+
+ public void insertUpdate( DocumentEvent event )
+ {
+ fireBaseChangedEvent();
+ }
+
+ public void removeUpdate( DocumentEvent event )
+ {
+ fireBaseChangedEvent();
+ }
+
+ public void changedUpdate( DocumentEvent event )
+ {
+ fireBaseChangedEvent();
+ }
+
+ private void fireBaseChangedEvent()
+ {
+ String artifact = getControllerFieldTextFromPreferences();
+ PropertyChangeEvent e =
+ new PropertyChangeEvent(
+ m_base, "base", null, m_base.getText() );
+ m_propertyChangeSupport.firePropertyChange( e );
+ }
+
+ //--------------------------------------------------------------
+ // PropertyChangeListener
+ //--------------------------------------------------------------
+
+ /**
+ * The actions dealing with changes to the dialog raise change events
that
+ * are captured here. This listener checks changes and enables or
disabled
+ * the ok and undo buttons based on the state of controls relative to the
+ * underlying preferences for the cache.
+ */
+ public void propertyChange( PropertyChangeEvent event )
+ {
+ String artifact = getControllerFieldTextFromPreferences();
+ boolean flag = ( false == artifact.equals( m_base.getText() ) );
+ m_ok.setEnabled( flag );
+ m_revert.setEnabled( flag );
+ if( !flag )
+ {
+ m_settings.setup();
+ }
+ else
+ {
+ m_settings.setEnabled( false );
+ }
+ }
+
+ private String getControllerFieldTextFromPreferences()
+ {
+ return m_preferences.get( "uri", "artifact:plugin:" );
+ }
+
+ private String getControllerPathFromPreferences()
+ {
+ return m_preferences.get( "uri", null );
+ }
+
+ public void preferenceChange( PreferenceChangeEvent event )
+ {
+ String artifact = getControllerFieldTextFromPreferences();
+ if( false == m_base.getText().equals( artifact ) )
+ {
+ m_base.setText( artifact );
+ }
+ }
+
+ private class CloseAction extends AbstractAction
+ {
+ CloseAction( String name )
+ {
+ super( name );
+ }
+
+ public void actionPerformed( ActionEvent event )
+ {
+ m_parent.hide();
+ }
+ }
+
+ private class SettingsAction extends AbstractAction
+ {
+ private Dialog m_parent;
+ private Dialog m_dialog;
+
+ SettingsAction( String name, Dialog parent )
+ {
+ super( name );
+ m_parent = parent;
+ setup();
+ }
+
+ public void setup()
+ {
+ String controllerPath = getControllerPathFromPreferences();
+ if( null == controllerPath )
+ {
+ setEnabled( false );
+ }
+ else
+ {
+ try
+ {
+ URI uri = new URI( controllerPath );
+ String classname = getControllerClassname( uri );
+ String controlClassname = classname + "ControlPanel";
+ ClassLoader classloader = getControllerClassLoader( uri
);
+ m_dialog = createControlPanel( classloader,
controlClassname, m_parent );
+ m_dialog.setModal( true );
+ setEnabled( true );
+ }
+ catch( ClassNotFoundException e )
+ {
+ setEnabled( false );
+ }
+ catch( Throwable e )
+ {
+ System.err.println( e.toString() );
+ e.printStackTrace();
+ setEnabled( false );
+ }
+ }
+ }
+
+ public void actionPerformed( ActionEvent event )
+ {
+ if( m_dialog != null )
+ {
+ m_dialog.setLocationRelativeTo( (Component)
event.getSource() );
+ m_dialog.setVisible( true );
+ }
+ }
+
+ private String getControllerClassname( URI uri ) throws Exception
+ {
+ URL url = new URL( uri.toString() );
+ Plugin plugin = (Plugin) url.getContent( new Class[]{
Plugin.class } );
+ return plugin.getClassname();
+ }
+
+ private ClassLoader getControllerClassLoader( URI uri ) throws
Exception
+ {
+ URL url = new URL( uri.toString() );
+ return (ClassLoader) url.getContent( new Class[]{
ClassLoader.class } );
+ }
+
+ private Dialog createControlPanel( ClassLoader classloader, String
classname, Dialog parent )
+ throws ClassNotFoundException, TransitException
+ {
+ try
+ {
+ Class cls = classloader.loadClass( classname );
+ Class[] params = new Class[]{ Dialog.class};
+ Object[] args = new Object[]{ parent };
+ Constructor cons = cls.getConstructor( params );
+ return (Dialog) cons.newInstance( args );
+ }
+ catch( ClassNotFoundException e )
+ {
+ throw e;
+ }
+ catch( Throwable e )
+ {
+ String error =
+ "Unable to establish a control panel using the class ["
+ + classname
+ + "].";
+ throw new TransitException( error, e );
+ }
+ }
+ }
+
+ private class RevertAction extends AbstractAction
+ {
+ RevertAction( String name )
+ {
+ super( name );
+ setEnabled( false );
+ }
+
+ public void actionPerformed( ActionEvent event )
+ {
+ String artifact = getControllerFieldTextFromPreferences();
+ String old = m_base.getText();
+ m_base.setText( artifact );
+ PropertyChangeEvent e =
+ new PropertyChangeEvent( this, "uri", old, artifact );
+ m_propertyChangeSupport.firePropertyChange( e );
+ }
+ }
+
+ private class OKAction extends AbstractAction
+ {
+ private Class m_service;
+
+ OKAction( String name, Class service )
+ {
+ super( name );
+ setEnabled( false );
+ m_service = service;
+ }
+
+ public void actionPerformed( ActionEvent event )
+ {
+ String text = m_base.getText();
+ String artifact = getControllerFieldTextFromPreferences();
+ if( false == text.equals( artifact ) )
+ {
+ if( "".equals( text ) )
+ {
+ m_preferences.remove( "uri" );
+ //m_parent.hide();
+ }
+ else
+ {
+ boolean validated = validateControllerSpec( m_parent,
text, m_service );
+ if( validated )
+ {
+ //m_parent.hide();
+ m_preferences.put( "uri", text );
+ }
+ }
+ }
+ m_ok.setEnabled( false );
+ m_revert.setEnabled( false );
+ m_settings.setup();
+ }
+ }
+
+ private boolean validateControllerSpec( Component component, String
spec, Class service )
+ {
+ URI uri = createControllerURI( component, spec );
+ if( null == uri )
+ {
+ return false;
+ }
+ URL url = getURLFromURI( component, uri );
+ if( null == url )
+ {
+ return false;
+ }
+ Plugin plugin = getPluginFromURL( component, url );
+ if( null == plugin )
+ {
+ return false;
+ }
+ String classname = plugin.getClassname();
+ return checkPluginClass( component, url, service );
+ }
+
+ private URI createControllerURI( Component component, String spec )
+ {
+ try
+ {
+ return new URI( spec );
+ }
+ catch( URISyntaxException e )
+ {
+ final String title = "Controller URI Error";
+ final String message = "Invalid uri.";
+ JOptionPane.showMessageDialog( component, message, title,
JOptionPane.ERROR_MESSAGE );
+ return null;
+ }
+ }
+
+ private URL getURLFromURI( Component component, URI uri )
+ {
+ try
+ {
+ String spec = uri.toString();
+ return new URL( spec );
+ }
+ catch( IOException e )
+ {
+ final String title = "Controller URI Error";
+ final String message = "Cannot convert the uri to a url.";
+ JOptionPane.showMessageDialog( component, message, title,
JOptionPane.ERROR_MESSAGE );
+ return null;
+ }
+ }
+
+ private Plugin getPluginFromURL( Component component, URL url )
+ {
+ try
+ {
+ return (Plugin) url.getContent( new Class[]{ Plugin.class } );
+ }
+ catch( Throwable e )
+ {
+ final String title = "Controller URI Error";
+ final String message = e.getMessage();
+ JOptionPane.showMessageDialog( component, message, title,
JOptionPane.ERROR_MESSAGE );
+ return null;
+ }
+ }
+
+ private boolean checkPluginClass( Component component, URL url, Class
service )
+ {
+ Class c = null;
+ try
+ {
+ c = (Class) url.getContent( new Class[]{ Class.class } );
+ }
+ catch( Throwable e )
+ {
+ final String title = "Controller URI Error";
+ final String message = e.getMessage();
+ e.printStackTrace();
+ JOptionPane.showMessageDialog( component, message, title,
JOptionPane.ERROR_MESSAGE );
+ return false;
+ }
+ if( false == service.isAssignableFrom( c ) )
+ {
+ final String title = "Controller URI Error";
+ final String message = "Plugin class does not implement " +
service.getName() + ".";
+ JOptionPane.showMessageDialog( component, message, title,
JOptionPane.ERROR_MESSAGE );
+ System.out.println( c.getClassLoader().toString() );
+ return false;
+ }
+ else
+ {
+ //
+ // check for an installer class
+ //
+
+ String installer = c.getName() + "Installer";
+ try
+ {
+ Class install = c.getClassLoader().loadClass( installer );
+ install.newInstance();
+ return true;
+ }
+ catch( ClassNotFoundException e )
+ {
+ return true;
+ }
+ catch( Throwable e )
+ {
+ final String title = "Controller URI Error";
+ final String message = "Plugin class install error in " +
installer + ".";
+ JOptionPane.showMessageDialog( component, message, title,
JOptionPane.ERROR_MESSAGE );
+ return false;
+ }
+ }
+ }
+}
+

Added:
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandlerControlPanel.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandlerControlPanel.java
Thu May 12 14:28:07 2005
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2005 Stephen McConnell
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.composition.unit;
+
+import java.awt.Dialog;
+import java.awt.Dimension;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import javax.swing.JDialog;
+import javax.swing.border.EmptyBorder;
+import javax.swing.JPanel;
+
+/**
+ * A registry of descriptions of plugable content handlers. This
implementation
+ * maps user defined preferences to instance of ContentHandlerDescriptor.
+ */
+public class CompositionContentHandlerControlPanel extends JDialog
+{
+ public CompositionContentHandlerControlPanel( Dialog parent )
+ {
+ super( parent );
+ setModal( true );
+ setSize( new Dimension( 400,400 ) );
+ JPanel frame = new JPanel();
+ frame.setLayout( new BorderLayout() );
+ frame.setBackground( Color.white );
+ frame.setBorder( new EmptyBorder( 10, 6, 0, 6 ) );
+ setContentPane( frame );
+ setTitle( "Content Handler Controller" );
+ }
+}



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

Archive powered by MHonArc 2.6.24.

Top of Page