Vuze/BiglyBT Swing emulation layer for NDT Applet.

This is a simple shim to allow running the NDT Applet code
with minimal modifications.
From BiglyBT MLab plugin:
Github rev e927dca, Aug. 18, 2018.
From https://github.com/BiglySoftware/BiglyBT-plugin-mlab
This is for Tcpbw100 from NDT 3.6.2b;
not sufficient to compile Tcpbw100 from 3.7.0.2,
changes to follow.
License: GPLv2.
This commit is contained in:
zzz
2018-11-13 17:20:33 +00:00
parent e20401373c
commit 71d8f0e4d4
37 changed files with 1607 additions and 0 deletions

View File

@ -0,0 +1,34 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
ActionEvent
{
public Object
getSource()
{
return( new Object());
}
}

View File

@ -0,0 +1,28 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public interface ActionListener {
}

View File

@ -0,0 +1,36 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
import java.net.URL;
public class AppletContext {
public void
showDocument(
URL url )
{
}
}

View File

@ -0,0 +1,30 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
BadLocationException
extends Exception
{
}

View File

@ -0,0 +1,34 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class BorderFactory {
public static Component
createTitledBorder(
String str )
{
return( new Component());
}
}

View File

@ -0,0 +1,31 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class BorderLayout {
public static final int NORTH = 1;
public static final int SOUTH = 2;
}

View File

@ -0,0 +1,37 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class BoxLayout {
public static int X_AXIS = 1;
public static int Y_AXIS = 2;
public
BoxLayout(
Component c,
int i )
{
}
}

View File

@ -0,0 +1,34 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class Clipboard {
public void
setContents(
StringSelection s,
StringSelection t )
{
}
}

View File

@ -0,0 +1,28 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class Color {
public static Color BLUE = null;
}

View File

@ -0,0 +1,147 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
Component
{
public void
setTitle(
String s )
{
}
public void
add(
Component c )
{
}
public void
add( String str, Component c )
{
}
public void
add( int i, Component c )
{
}
public void
setEnabled(
boolean b )
{
}
public void
setVisible(
boolean b )
{
}
public void
setEditable(
boolean b )
{
}
public void
setResizable(
boolean b )
{
}
public void
setSize(
int i, int j )
{
}
public void
setPreferredSize(
Dimension d )
{
}
public void
setBorder(
Component c )
{
}
public void
setLayout(
BorderLayout l )
{
}
public void
setLayout(
BoxLayout l )
{
}
public void
setCursor(
Cursor c )
{
}
public void
setForeground(
Color c )
{
}
public void
pack()
{
}
public void
repaint()
{
}
public Toolkit
getToolkit()
{
return( new Toolkit());
}
public void
addMouseListener(
MouseAdapter l )
{
}
public void
addWindowListener(
WindowAdapter l )
{
}
}

View File

@ -0,0 +1,35 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class Cursor {
public static Cursor HAND_CURSOR = null;
public
Cursor(
Cursor c )
{
}
}

View File

@ -0,0 +1,29 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class Dimension {
public Dimension( int x, int y ){}
}

View File

@ -0,0 +1,61 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
import java.net.URL;
public class JApplet extends JFrame{
public URL
getCodeBase()
{
return( null );
}
public AppletContext
getAppletContext()
{
return( null );
}
public String
getParameter(
String name )
{
return( null );
}
public void
showStatus(
String str )
{
System.out.println( "status: " + str );
}
public void
start()
{
}
}

View File

@ -0,0 +1,42 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JButton
extends Component
{
public
JButton(
String name )
{
}
public void
addActionListener(
ActionListener l )
{
}
}

View File

@ -0,0 +1,51 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JCheckBox
extends Component
{
boolean selected;
public
JCheckBox(
String str )
{
}
public void
setSelected(
boolean b )
{
selected = b;
}
public boolean
isSelected()
{
return( selected );
}
}

View File

@ -0,0 +1,51 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JComboBox
extends Component
{
private int index;
public void
setSelectedIndex(
int i )
{
index = i;
}
public int
getSelectedIndex()
{
return( index );
}
public void
addItem(
String str )
{
}
}

View File

@ -0,0 +1,67 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JFrame
extends Component
{
private Panel content_pane = new Panel();
public
JFrame()
{
}
public
JFrame(
String s )
{
}
public Panel
getContentPane()
{
return( content_pane );
}
public void
toBack()
{
}
public void
destroy()
{
}
public void
dispose()
{
}
}

View File

@ -0,0 +1,54 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JLabel
extends Component
{
public
JLabel()
{
}
public
JLabel(
String s )
{
}
public void
setText(
String s )
{
}
public void
setAlignmentY(
float f )
{
}
}

View File

@ -0,0 +1,49 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JOptionPane
{
public static final int INFORMATION_MESSAGE = 0;
public static void
showMessageDialog(
Object wha,
String str )
{
System.out.println( "dialog: " + str );
}
public static void
showMessageDialog(
Object wha,
String str1,
String str2,
int a )
{
System.out.println( "dialog: " + str1 + "/" + str2 );
}
}

View File

@ -0,0 +1,43 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JPanel
extends Component
{
@Override
public void
add( Component c )
{
}
@Override
public void
add( String str, Component c )
{
}
}

View File

@ -0,0 +1,74 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JProgressBar
extends Component
{
private boolean indeterminate;
public void
setString(
String str )
{
}
public void
setValue(
int i )
{
}
public void
setMinimum(
int i )
{
}
public void
setMaximum(
int i )
{
}
public void
setStringPainted(
boolean b )
{
}
public void
setIndeterminate(
boolean b )
{
indeterminate = b;
}
public boolean
isIndeterminate()
{
return( indeterminate );
}
}

View File

@ -0,0 +1,36 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JScrollPane
extends Component
{
public
JScrollPane(
Component p )
{
}
}

View File

@ -0,0 +1,49 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JSpinner
extends Component
{
private SpinnerNumberModel model;
public int
getValue()
{
if ( model == null ){
return( 0 );
}
return( model.getValue());
}
public void
setModel(
SpinnerNumberModel _model )
{
model = _model;
}
}

View File

@ -0,0 +1,69 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JTextArea
extends Component
{
private String text = "";
public
JTextArea(
String str,
int a,
int b )
{
text = str;
}
public void
append(
String str )
{
Tcpbw100UIWrapperListener listener = Tcpbw100UIWrapper.current_adapter;
if ( listener != null ){
listener.reportDetail( str );
}else{
System.out.println( "text: " + str );
}
text += str;
}
public String
getText()
{
return( text );
}
public void
selectAll()
{
}
}

View File

@ -0,0 +1,55 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
JTextPane
extends Component
{
private StyledDocument sd = new StyledDocument();
public void
insertComponent(
Component comp )
{
}
public StyledDocument
getStyledDocument()
{
return( sd );
}
public void
setSelectionStart(
int i )
{
}
public void
setSelectionEnd(
int i )
{
}
}

View File

@ -0,0 +1,28 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class MouseAdapter {
}

View File

@ -0,0 +1,28 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class MouseEvent {
}

View File

@ -0,0 +1,40 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
Panel
extends Component
{
public void
validate()
{
}
public void
remove(
Component c )
{
}
}

View File

@ -0,0 +1,49 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
SpinnerNumberModel
{
private int value;
public void
setValue(
int i )
{
value = i;
}
public int
getValue()
{
return( value );
}
public void
setMinimum(
int i )
{
}
}

View File

@ -0,0 +1,34 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class StringSelection {
public
StringSelection(
String s )
{
}
}

View File

@ -0,0 +1,58 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
StyledDocument
{
public String str = "";
public int
getLength()
{
return( str.length());
}
public void
insertString(
int offset,
String s,
Object x )
throws BadLocationException
{
Tcpbw100UIWrapperListener listener = Tcpbw100UIWrapper.current_adapter;
if ( listener != null ){
listener.reportSummary( s );
}else{
System.out.println( "doc: " + s );
}
str += s;
}
}

View File

@ -0,0 +1,37 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class
Tcpbw100UIWrapper
{
public static Tcpbw100UIWrapperListener current_adapter;
public
Tcpbw100UIWrapper(
Tcpbw100UIWrapperListener adapter )
{
current_adapter = adapter;
}
}

View File

@ -0,0 +1,36 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public interface
Tcpbw100UIWrapperListener
{
public void
reportSummary(
String str );
public void
reportDetail(
String str );
}

View File

@ -0,0 +1,33 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class Toolkit {
public Clipboard
getSystemClipboard()
{
return( new Clipboard());
}
}

View File

@ -0,0 +1,28 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class WindowAdapter {
}

View File

@ -0,0 +1,28 @@
/*
* Created on May 20, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* 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 ( see the LICENSE file ).
*
* 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 com.vuze.plugins.mlab.tools.ndt.swingemu;
public class WindowEvent {
}