[Squirrel-sql-commits] sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbean
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Rob M. <man...@us...> - 2007-08-24 00:29:28
|
Update of /cvsroot/squirrel-sql/sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9345/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans Modified Files: NetbeansSQLEntryPanel.java Log Message: Added basic drag-n-drop to place files from desktop into an SQL Editor panel. Index: NetbeansSQLEntryPanel.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/NetbeansSQLEntryPanel.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** NetbeansSQLEntryPanel.java 11 Aug 2007 17:22:50 -0000 1.20 --- NetbeansSQLEntryPanel.java 24 Aug 2007 00:29:21 -0000 1.21 *************** *** 19,22 **** --- 19,23 ---- */ import java.awt.Font; + import java.awt.dnd.DropTarget; import java.awt.event.ActionEvent; import java.awt.event.MouseListener; *************** *** 39,42 **** --- 40,44 ---- import net.sourceforge.squirrel_sql.client.session.parser.IParserEventsProcessor; import net.sourceforge.squirrel_sql.client.session.parser.IParserEventsProcessorFactory; + import net.sourceforge.squirrel_sql.fw.gui.dnd.FileEditorDropTargetListener; import net.sourceforge.squirrel_sql.fw.util.log.ILogger; import net.sourceforge.squirrel_sql.fw.util.log.LoggerController; *************** *** 58,67 **** private NetbeansSQLEditorPane _textArea; - private SyntaxFactory _syntaxFactory; private ISession _session; private SyntaxPugin _plugin; private NetbeansPropertiesWrapper _propertiesWrapper; ! NetbeansSQLEntryPanel(ISession session, SyntaxPreferences prefs, --- 60,71 ---- private NetbeansSQLEditorPane _textArea; private SyntaxFactory _syntaxFactory; private ISession _session; private SyntaxPugin _plugin; private NetbeansPropertiesWrapper _propertiesWrapper; ! ! @SuppressWarnings("unused") ! private DropTarget dt; ! NetbeansSQLEntryPanel(ISession session, SyntaxPreferences prefs, *************** *** 69,98 **** SyntaxPugin plugin, HashMap<String, IParserEventsProcessorFactory> props) ! { ! super(session.getApplication()); ! _propertiesWrapper = new NetbeansPropertiesWrapper(props); ! _plugin = plugin; - if (session == null) - { - throw new IllegalArgumentException("Null ISession passed"); - } ! _syntaxFactory = syntaxFactory; ! _session = session; ! _plugin = plugin; ! _app = session.getApplication(); ! _textArea = new NetbeansSQLEditorPane(session, ! prefs, ! syntaxFactory, ! _plugin, ! getIdentifier(), ! _propertiesWrapper); ! } --- 73,103 ---- SyntaxPugin plugin, HashMap<String, IParserEventsProcessorFactory> props) ! { ! super(session.getApplication()); ! if (session == null) ! { ! throw new IllegalArgumentException("Null ISession passed"); ! } ! _propertiesWrapper = new NetbeansPropertiesWrapper(props); ! _plugin = plugin; ! _syntaxFactory = syntaxFactory; ! _session = session; ! _plugin = plugin; ! _app = session.getApplication(); ! _textArea = new NetbeansSQLEditorPane(session, ! prefs, ! syntaxFactory, ! _plugin, ! getIdentifier(), ! _propertiesWrapper); ! dt = new DropTarget(_textArea, new FileEditorDropTargetListener(session)); ! } *************** *** 439,443 **** } - /* (non-Javadoc) * @see net.sourceforge.squirrel_sql.client.session.ISQLEntryPanel#setUndoManager(javax.swing.undo.UndoManager) --- 444,447 ---- *************** *** 445,448 **** public void setUndoManager(UndoManager manager) { _textArea.setUndoManager(manager); ! } } --- 449,452 ---- public void setUndoManager(UndoManager manager) { _textArea.setUndoManager(manager); ! } } |