From: SourceForge.net <no...@so...> - 2006-05-11 19:21:10
|
Bugs item #501470, was opened at 2002-01-09 20:39 Message generated for change (Settings changed) made by fwierzbicki You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=501470&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Jythonc compiler >Group: Deferred Status: Open Resolution: None Priority: 5 Submitted By: Scott James (ascribbler) Assigned to: Nobody/Anonymous (nobody) Summary: accessing "outside" packages Initial Comment: Already submitted this to jython-users. No response yet. Thanks scott ----------- I'm attempting to compile a program (already executing under jython correctly) using jythonc. There seems to be some problem using an external library (dsx, a vendor-supplied jar) 1 .\jpywork\GenericTool.java:364: dsx.JDockFloatPro.CBaseFrame is not public in dsx.JDockFloatPro; cannot be accessed from outside package I browsed the archives (is there some way of searching for text in it?) but wasn't able to find any clues. I'm using sun's jdk 1.3.0 on Windows NT. thanks in advance scott ..........................(command output, jthon, and jythonc output follow)...... processing GenericTool Required packages: dsx.JDockFloatPro* javax.swing.text javax.swing.tree* java.awt.print java.awt.peer java.awt.font javax.swing.colorchooser java.awt.datatransfer java.awt.geom javax.swing.undo java.awt* javax.swing.event* javax.swing.border* javax.swing.filechooser java.awt.im java.awt.image javax.swing.table java.awt.dnd java.awt.color java.awt.event* javax.swing* javax.swing.plaf Creating adapters: Creating .java files: GenericTool module ExitListener extends java.lang.Object implements java.awt.event.ActionListener GenericTool extends dsx.JDockFloatPro.DockFloatFrame LaunchListener extends java.lang.Object implements java.awt.event.ActionListener Compiling .java to .class... Compiling with args: ['D:\\JBuilder4\\jdk1.3 \\bin\\javac', '-classpath', 'C:\\Program Files\\GeneExpress Production\\gx.jar;C:\\Program Files\\GeneExpress Production\\jaxp.jar;C:\\Program Files\\GeneExpress Production\\crimson.jar;C:\\Program Files\\GeneExpress Production\\xalan.jar;C:\\Program Files\\GeneExpress Production\\classes12.jar;D:\\Code\\vendorlibs\\JDockFl oatPro.jar;D:\\Program Files\\jython\\jython.jar;D:\\Code\\;D:\\CVS\\GX20 \\java\\;;.\\jpywork;;D:\\Program Files\\jython\\Tools\\jythonc;D:\\Code\\com\\genelogic\ \gx2\\tools\\.;D:\\Program Files\\jython\\Lib;D:\\Program Files\\jython', '.\\jpywork\\GenericTool.java'] 1 .\jpywork\GenericTool.java:364: dsx.JDockFloatPro.CBaseFrame is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadBlock(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:364: dsx.JDockFloatPro.CDockBlock is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadBlock(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:368: dsx.JDockFloatPro.CBaseFrame is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadGeneralBlocks (java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:368: dsx.JDockFloatPro.CDockBlock is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadGeneralBlocks (java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:372: dsx.JDockFloatPro.CDockBlock is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadToolBarBlocks (java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CDockBlock arg1) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:376: dsx.JDockFloatPro.CDockBlock is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadToolbarBlock (java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CDockBlock arg1) throws java.lang.Exception { ^ Note: .\jpywork\GenericTool.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. 6 errors ERROR DURING JAVA COMPILATION... EXITING ..... # $Id: Exp $ # Copyright (c) 1999-2002, by Gene Logic, Inc. All rights reserved. # # # The following code creates a mock UI demonstrating usage-flow within a generic tool. # Language: Jython 2.1 from __future__ import nested_scopes # allows nested listeners (closer to Java paradigm) # Python packages .. import sys # Java packages .. from java.awt import * from java.awt.event import * from javax.swing import * from javax.swing.event import * from javax.swing.border import * from javax.swing.tree import * # vendor packages .. # import dsx.JDockFloatPro from dsx.JDockFloatPro import * false, true = 0, 1 class GenericTool (DockFloatFrame): def __init__ (tool): # create containers ... tool.menu = menu = {} tool.views = views = [] # strictly Swing stuff ... tool.menubar = menubar = JMenuBar() # tool.setJMenuBar(tool.menubar) # use this without JDockFloat docked_menubar = DockFloatMenuBar (tool, "Menu Bar") docked_menubar.setDockableMask (DockFloatWindow.DOCKTOPMASK|DockFloatWindow.DOCKBOTTOM MASK); tool.LoadDockFloatStates(""); # what does this *actually* do? Seems *necessary*! # tool.setDragAreaStyle(tool.DRAGHANDLE) # makes pretty border handles # The listeners surrounding tool functionality ... class ExitListener(ActionListener): def actionPerformed(self,event): sys.exit (0) class LaunchListener (ActionListener): def actionPerformed(self,event): x = len (views) views.append (DockFloatPanel(tool,"View" + str(x))) view = views [x] view.setSize(100,50) button = JButton ("Hello") # button.addActionListener(ViewButton()) view.add (button) view.initStates(view.DOCKLEFT) # Links from menu commands to listeners .. menu_calls=(("File", (("New", None), ("Open", None), ("Save", None), ("Save _As", None), ("Close", ExitListener()))), ("Modifiers", (("Add",None), ("Copy",None), ("Delete",None), ("Order",None))), ("Visuali_zations", (("Add",LaunchListener()), ("Edit",None), ("Copy",None), ("Delete",None), ("Edit _Reusable Viewers",None), ("Set Tool S_pecific Parameters",None))), ("View",()), ("Window",())) def Mnemonic (string): found = string.find ("_") if found > 0: return string[found+1] else: return string[0] def Clean(string): return string.replace ("_","") # create the listener associations in Swing ... NAME = 0 SUBITEMS = 1 ACTION_COMMAND=2 for key in range(len(menu_calls)): top_level = menu_calls[key] top_key = top_level[NAME] name = Clean (top_key) menu[name] = JMenu(name) menu[name].setMnemonic (Mnemonic(top_key)) menubar.add(menu[name]) first_items = top_level [SUBITEMS] for item_key in range(len(first_items)): first_item = first_items[item_key][NAME] item_name = Clean (first_item) item = JMenuItem(item_name) item.setMnemonic (Mnemonic(first_item)) menu[name].add (item) call = first_items [item_key][SUBITEMS] if call != None: item.addActionListener(call) if len (first_items[item_key]) > 2: item.setActionCommand (first_items [item_key][ACTION_COMMAND]) # set some frame defaults ... docked_menubar.setMenuBar(tool.menubar); docked_menubar.initStates(true); tool.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) def manual_test (tool): tool.setTitle("Generic Tool Test") tool.setSize(800, 400) tool.setVisible(true) # regression test ... mytool = GenericTool() mytool.manual_test () .... import org.python.core.*; public class GenericTool extends dsx.JDockFloatPro.DockFloatFrame implements org.python.core.PyProxy, org.python.core.ClassDictInit { static String[] jpy$mainProperties = new String[] {"python.modules.builtin", "exceptions:org.python.core. exceptions"}; static String[] jpy$proxyProperties = new String[] {"python.modules.builtin", "exceptions:org.python.core. exceptions", "python.options.showJavaExceptions", "true "}; static String[] jpy$packages = new String[] {"dsx.JDockFloatPro", "DockFloatFrame,DockCheck,DockFlo atPanel,DockFloatAdapter,PanelFrame,DockFloatToolBar,Do ckFloatListener,DockFloatMenuBar,DockFloatToolMenuBar,D ockFloatWindow", "javax.swing.text", null, "javax.swing.tree", "TreeCellRenderer,DefaultTree CellEditor,TreePath,AbstractLayoutCache,TreeSelectionMo del,VariableHeightLayoutCache,TreeModel,DefaultTreeMode l,DefaultMutableTreeNode,DefaultTreeCellRenderer,Expand VetoException,FixedHeightLayoutCache,TreeCellEditor,Mut ableTreeNode,TreeNode,DefaultTreeSelectionModel,RowMapp er", "java.awt.print", null, "java.awt.peer", null, "java.awt.font", null, "javax.swing.colorchooser", null, "java.awt.datatransfer", null, "java.awt.geom", null, "javax.swing.undo", null, "java.awt", "AlphaComposite,GraphicsDevice,Color, Font,Image,List,Dimension,Point,FlowLayout,JobAttribute s,Shape,CompositeContext,AWTError,BasicStroke,TextCompo nent,Toolkit,Checkbox,AWTException,PopupMenu,MenuItem,G ridLayout,Canvas,Button,AWTPermission,PageAttributes,Gr idBagLayout,Window,FileDialog,MenuBar,GraphicsConfigTem plate,IllegalComponentStateException,PrintGraphics,Choi ce,TextField,TexturePaint,CheckboxMenuItem,Label,AWTEve nt,FontFormatException,ActiveEvent,AWTEventMulticaster, GridBagConstraints,Graphics2D,CheckboxGroup,BorderLayou t,CardLayout,ItemSelectable,Robot,RenderingHints,MenuCo ntainer,Rectangle,Graphics,Container,PrintJob,PaintCont ext,Polygon,GraphicsConfiguration,Insets,Transparency,F ontMetrics,EventQueue,Stroke,Component,LayoutManager2,P aint,MediaTracker,Frame,Scrollbar,Dialog,ScrollPane,Pan el,MenuShortcut,LayoutManager,SystemColor,Event,Menu,Co mponentOrientation,TextArea,Composite,Adjustable,Gradie ntPaint,MenuComponent,GraphicsEnvironment,Cursor", "jav ax.swing.event", "TreeWillExpandListener,MenuDragMouseL istener,MouseInputAdapter,MenuKeyListener,TreeModelList ener,MouseInputListener,TreeExpansionEvent,CaretListene r,ListSelectionListener,PopupMenuEvent,EventListenerLis t,InternalFrameListener,TableColumnModelListener,MenuEv ent,PopupMenuListener,ListDataListener,InternalFrameAda pter,CaretEvent,TreeSelectionListener,MenuKeyEvent,Undo ableEditListener,AncestorEvent,MenuDragMouseEvent,Table ModelListener,TreeExpansionListener,AncestorListener,Do cumentListener,ChangeListener,InternalFrameEvent,MenuLi stener,SwingPropertyChangeSupport,ChangeEvent,ListDataE vent,ListSelectionEvent,HyperlinkListener,TableModelEve nt,UndoableEditEvent,CellEditorListener,TreeSelectionEv ent,TreeModelEvent,HyperlinkEvent,TableColumnModelEvent ,DocumentEvent", "javax.swing.border", "LineBorder,Matt eBorder,SoftBevelBorder,TitledBorder,CompoundBorder,Bev elBorder,AbstractBorder,Border,EtchedBorder,EmptyBorder ", "javax.swing.filechooser", null, "java.awt.im", null, "java.awt.image", null, "javax.swing.table", null, "java.awt.dnd", null, "java.awt.color", null, "java.awt.event", "FocusEvent,WindowAdapter,Actio nListener,HierarchyBoundsAdapter,HierarchyBoundsListene r,TextEvent,KeyAdapter,ContainerEvent,InputMethodListen er,MouseEvent,FocusAdapter,MouseMotionAdapter,Component Listener,MouseListener,ItemListener,ActionEvent,Adjustm entListener,HierarchyListener,ComponentEvent,WindowList ener,InputMethodEvent,ContainerAdapter,ItemEvent,MouseM otionListener,FocusListener,MouseAdapter,TextListener,K eyListener,HierarchyEvent,AWTEventListener,ComponentAda pter,InvocationEvent,WindowEvent,PaintEvent,InputEvent, ContainerListener,KeyEvent,AdjustmentEvent", "javax.swi ng", "Scrollable,JToolTip,JEditorPane,AbstractCellEdito r,UIDefaults,JCheckBox,JDesktopPane,JPasswordField,JTex tArea,OverlayLayout,UnsupportedLookAndFeelException,JPa nel,FocusManager,JMenu,JButton,JSplitPane,JApplet,Image Icon,InputMap,DefaultListCellRenderer,UIManager,JScroll Bar,JSeparator,DefaultCellEditor,JProgressBar,JComponen t,CellEditor,JCheckBoxMenuItem,DesktopManager,ListCellR enderer,CellRendererPane,JToolBar,ProgressMonitorInputS tream,JInternalFrame,JRadioButtonMenuItem,ViewportLayou t,ButtonModel,JSlider,ComponentInputMap,ListSelectionMo del,JLabel,KeyStroke,JTabbedPane,InputVerifier,JFrame,A ctionMap,JOptionPane,JScrollPane,ComboBoxModel,JWi ndow,JTextField,BoxLayout,SwingUtilities,JRadioButton,A ction,JMenuItem,RepaintManager,MenuSelectionManager,JCo lorChooser,DefaultButtonModel,SwingConstants,DebugGraph ics,JLayeredPane,JTree,MutableComboBoxModel,DefaultDesk topManager,DefaultComboBoxModel,ScrollPaneLayout,Bounde dRangeModel,JViewport,SizeRequirements,AbstractListMode l,JTextPane,JPopupMenu,WindowConstants,JList,RootPaneCo ntainer,JMenuBar,SizeSequence,ComboBoxEditor,Renderer,B ox,GrayFilter,JDialog,AbstractButton,JRootPane,JFileCho oser,ScrollPaneConstants,Timer,SingleSelectionModel,But tonGroup,AbstractAction,BorderFactory,DefaultBoundedRan geModel,ListModel,DefaultFocusManager,DefaultSingleSele ctionModel,DefaultListModel,JComboBox,ToolTipManager,Pr ogressMonitor,MenuElement,LookAndFeel,JTable,Icon,Defau ltListSelectionModel,JToggleButton", "javax.swing.plaf" , null}; public static class _PyInner extends PyFunctionTable implements PyRunnable { private static PyObject i$0; private static PyObject i$1; private static PyObject s$2; private static PyObject s$3; private static PyObject s$4; private static PyObject i$5; private static PyObject i$6; private static PyObject s$7; private static PyObject s$8; private static PyObject s$9; private static PyObject s$10; private static PyObject s$11; private static PyObject s$12; private static PyObject s$13; private static PyObject s$14; private static PyObject s$15; private static PyObject s$16; private static PyObject s$17; private static PyObject s$18; private static PyObject s$19; private static PyObject s$20; private static PyObject s$21; private static PyObject s$22; private static PyObject s$23; private static PyObject s$24; private static PyObject i$25; private static PyObject s$26; private static PyObject i$27; private static PyObject i$28; private static PyObject s$29; private static PyFunctionTable funcTable; private static PyCode c$0_actionPerformed; private static PyCode c$1_ExitListener; private static PyCode c$2_actionPerformed; private static PyCode c$3_LaunchListener; private static PyCode c$4_Mnemonic; private static PyCode c$5_Clean; private static PyCode c$6___init__; private static PyCode c$7_manual_test; private static PyCode c$8_GenericTool; private static PyCode c$9_main; private static void initConstants() { i$0 = Py.newInteger(0); i$1 = Py.newInteger(1); s$2 = Py.newString("Menu Bar"); s$3 = Py.newString(""); s$4 = Py.newString("View"); i$5 = Py.newInteger(100); i$6 = Py.newInteger(50); s$7 = Py.newString("Hello"); s$8 = Py.newString("File"); s$9 = Py.newString("New"); s$10 = Py.newString("Open"); s$11 = Py.newString("Save"); s$12 = Py.newString("Save _As"); s$13 = Py.newString("Close"); s$14 = Py.newString("Modifiers"); s$15 = Py.newString("Add"); s$16 = Py.newString("Copy"); s$17 = Py.newString("Delete"); s$18 = Py.newString("Order"); s$19 = Py.newString("Visuali_zations"); s$20 = Py.newString("Edit"); s$21 = Py.newString("Edit _Reusable Viewers"); s$22 = Py.newString("Set Tool S_pecific Parameters"); s$23 = Py.newString("Window"); s$24 = Py.newString("_"); i$25 = Py.newInteger(2); s$26 = Py.newString("Generic Tool Test"); i$27 = Py.newInteger(800); i$28 = Py.newInteger(400); s$29 = Py.newString ("D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py"); funcTable = new _PyInner(); c$0_actionPerformed = Py.newCode(2, new String[] {"self", "event"}, "D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "actionPerformed", false, false, funcTable, 0, null, null, 0, 17); c$1_ExitListener = Py.newCode(0, new String [] {}, "D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "ExitListener", false, false, funcTable, 1, null, null, 0, 16); c$2_actionPerformed = Py.newCode(2, new String[] {"self", "event", "button", "view", "x"}, "D:\\Code\\co m\\genelogic\\gx2 \\tools\\GenericTool.py", "actionPerformed", false, false, funcTable, 2, null, new String[] {"tool", "views"}, 0, 17); c$3_LaunchListener = Py.newCode(0, new String[] {}, "D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "LaunchListener", false, false, funcTable, 3, null, new String[] {"views", "tool"}, 0, 16); c$4_Mnemonic = Py.newCode(1, new String[] {"string", "found"}, "D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "Mnemonic", false, false, funcTable, 4, null, null, 0, 17); c$5_Clean = Py.newCode(1, new String[] {"string"}, "D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "Clean", false, false, funcTable, 5, null, null, 0, 17); c$6___init__ = Py.newCode(1, new String[] {"tool", "call", "menubar", "Mnemonic", "item_key", "Ex itListener", "SUBITEMS", "name", "top_key", "menu_calls ", "ACTION_COMMAND", "key", "Clean", "first_item", "ite m", "top_level", "item_name", "NAME", "first_items", "L aunchListener", "menu", "docked_menubar", "views"}, "D: \\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "__init__", false, false, funcTable, 6, new String[] {"views", "tool"}, null, 1, 17); c$7_manual_test = Py.newCode(1, new String [] {"tool"}, "D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "manual_test", false, false, funcTable, 7, null, null, 0, 17); c$8_GenericTool = Py.newCode(0, new String [] {}, "D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "GenericTool", false, false, funcTable, 8, null, null, 0, 16); c$9_main = Py.newCode(0, new String[] {}, "D:\\Code\\com\\genelogic\\gx2 \\tools\\GenericTool.py", "main", false, false, funcTable, 9, null, null, 0, 16); } public PyCode getMain() { if (c$9_main == null) _PyInner.initConstants(); return c$9_main; } public PyObject call_function(int index, PyFrame frame) { switch (index){ case 0: return _PyInner.actionPerformed$1 (frame); case 1: return _PyInner.ExitListener$2(frame); case 2: return _PyInner.actionPerformed$3 (frame); case 3: return _PyInner.LaunchListener$4 (frame); case 4: return _PyInner.Mnemonic$5(frame); case 5: return _PyInner.Clean$6(frame); case 6: return _PyInner.__init__$7(frame); case 7: return _PyInner.manual_test$8(frame); case 8: return _PyInner.GenericTool$9(frame); case 9: return _PyInner.main$10(frame); default: return null; } } private static PyObject actionPerformed$1 (PyFrame frame) { frame.getglobal("sys").__getattr__ ("exit").__call__(i$0); return Py.None; } private static PyObject ExitListener$2(PyFrame frame) { frame.setlocal("actionPerformed", new PyFunction(frame.f_globals, new PyObject[] {}, c$0_actionPerformed)); return frame.getf_locals(); } private static PyObject actionPerformed$3 (PyFrame frame) { frame.setlocal(4, frame.getglobal ("len").__call__(frame.getderef(1))); frame.getderef(1).invoke("append", frame.getglobal("DockFloatPanel").__call__ (frame.getderef(0), s$4._add(frame.getglobal ("str").__call__(frame.getlocal(4))))); frame.setlocal(3, frame.getderef (1).__getitem__(frame.getlocal(4))); frame.getlocal(3).invoke("setSize", i$5, i$6); frame.setlocal(2, frame.getglobal ("JButton").__call__(s$7)); frame.getlocal(3).invoke("add", frame.getlocal(2)); frame.getlocal(3).invoke("initStates", frame.getlocal(3).__getattr__("DOCKLEFT")); return Py.None; } private static PyObject LaunchListener$4 (PyFrame frame) { frame.setlocal("actionPerformed", new PyFunction(frame.f_globals, new PyObject[] {}, c$2_actionPerformed, new PyObject[] {frame.getclosure (1), frame.getclosure(0)})); return frame.getf_locals(); } private static PyObject Mnemonic$5(PyFrame frame) { frame.setlocal(1, frame.getlocal(0).invoke ("find", s$24)); if (frame.getlocal(1)._gt(i$0).__nonzero__ ()) { return frame.getlocal(0).__getitem__ (frame.getlocal(1)._add(i$1)); } else { return frame.getlocal(0).__getitem__ (i$0); } } private static PyObject Clean$6(PyFrame frame) { return frame.getlocal(0).invoke("replace", s$24, s$3); } private static PyObject __init__$7(PyFrame frame) { frame.to_cell(0, 1); // Temporary Variables int t$0$int, t$1$int; PyObject t$0$PyObject, t$1$PyObject, t$2 $PyObject, t$3$PyObject; // Code t$0$PyObject = new PyDictionary(new PyObject[] {}); frame.getderef(1).__setattr__("menu", t$0 $PyObject); frame.setlocal(20, t$0$PyObject); t$0$PyObject = new PyList(new PyObject[] {}); frame.getderef(1).__setattr__("views", t$0 $PyObject); frame.setderef(0, t$0$PyObject); t$0$PyObject = frame.getglobal ("JMenuBar").__call__(); frame.getderef(1).__setattr__("menubar", t$0$PyObject); frame.setlocal(2, t$0$PyObject); frame.setlocal(21, frame.getglobal ("DockFloatMenuBar").__call__(frame.getderef(1), s$2)); frame.getlocal(21).invoke ("setDockableMask", frame.getglobal ("DockFloatWindow").__getattr__("DOCKTOPMASK")._or (frame.getglobal("DockFloatWindow").__getattr__ ("DOCKBOTTOMMASK"))); frame.getderef(1).invoke ("LoadDockFloatStates", s$3); frame.setlocal(5, Py.makeClass ("ExitListener", new PyObject[] {frame.getglobal ("ActionListener")}, c$1_ExitListener, null, ExitListener.class)); frame.setlocal(19, Py.makeClass ("LaunchListener", new PyObject[] {frame.getglobal ("ActionListener")}, c$3_LaunchListener, null, LaunchListener.class, new PyObject[] {frame.getclosure (0), frame.getclosure(1)})); frame.setlocal(9, new PyTuple(new PyObject [] {new PyTuple(new PyObject[] {s$8, new PyTuple(new PyObject[] {new PyTuple(new PyObject[] {s$9, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$10, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$11, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$12, frame.getglobal ("None")}), new PyTuple(new PyObject[] {s$13, frame.getlocal(5).__call__()})})}), new PyTuple(new PyObject[] {s$14, new PyTuple(new PyObject[] {new PyTuple(new PyObject[] {s$15, frame.getglobal ("None")}), new PyTuple(new PyObject[] {s$16, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$17, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$18, frame.getglobal("None")})})}), new PyTuple(new PyObject[] {s$19, new PyTuple(new PyObject [] {new PyTuple(new PyObject[] {s$15, frame.getlocal (19).__call__()}), new PyTuple(new PyObject[] {s$20, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$16, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$17, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$21, frame.getglobal ("None")}), new PyTuple(new PyObject[] {s$22, frame.getglobal("None")})})}), new PyTuple(new PyObject [] {s$4, new PyTuple(new PyObject[] {})}), new PyTuple (new PyObject[] {s$23, new PyTuple(new PyObject[] {})})})); frame.setlocal(3, new PyFunction (frame.f_globals, new PyObject[] {}, c$4_Mnemonic)); frame.setlocal(12, new PyFunction (frame.f_globals, new PyObject[] {}, c$5_Clean)); frame.setlocal(17, i$0); frame.setlocal(6, i$1); frame.setlocal(10, i$25); t$0$int = 0; t$1$PyObject = frame.getglobal ("range").__call__(frame.getglobal("len").__call__ (frame.getlocal(9))); while ((t$0$PyObject = t$1 $PyObject.__finditem__(t$0$int++)) != null) { frame.setlocal(11, t$0$PyObject); frame.setlocal(15, frame.getlocal (9).__getitem__(frame.getlocal(11))); frame.setlocal(8, frame.getlocal (15).__getitem__(frame.getlocal(17))); frame.setlocal(7, frame.getlocal (12).__call__(frame.getlocal(8))); frame.getlocal(20).__setitem__ (frame.getlocal(7), frame.getglobal("JMenu").__call__ (frame.getlocal(7))); frame.getlocal(20).__getitem__ (frame.getlocal(7)).invoke("setMnemonic", frame.getlocal(3).__call__(frame.getlocal(8))); frame.getlocal(2).invoke("add", frame.getlocal(20).__getitem__(frame.getlocal(7))); frame.setlocal(18, frame.getlocal (15).__getitem__(frame.getlocal(6))); t$1$int = 0; t$3$PyObject = frame.getglobal ("range").__call__(frame.getglobal("len").__call__ (frame.getlocal(18))); while ((t$2$PyObject = t$3 $PyObject.__finditem__(t$1$int++)) != null) { frame.setlocal(4, t$2$PyObject); frame.setlocal(13, frame.getlocal (18).__getitem__(frame.getlocal(4)).__getitem__ (frame.getlocal(17))); frame.setlocal(16, frame.getlocal (12).__call__(frame.getlocal(13))); frame.setlocal(14, frame.getglobal ("JMenuItem").__call__(frame.getlocal(16))); frame.getlocal(14).invoke ("setMnemonic", frame.getlocal(3).__call__ (frame.getlocal(13))); frame.getlocal(20).__getitem__ (frame.getlocal(7)).invoke("add", frame.getlocal(14)); frame.setlocal(1, frame.getlocal (18).__getitem__(frame.getlocal(4)).__getitem__ (frame.getlocal(6))); if (frame.getlocal(1)._ne (frame.getglobal("None")).__nonzero__()) { frame.getlocal(14).invoke ("addActionListener", frame.getlocal(1)); if (frame.getglobal ("len").__call__(frame.getlocal(18).__getitem__ (frame.getlocal(4)))._gt(i$25).__nonzero__()) { frame.getlocal(14).invoke ("setActionCommand", frame.getlocal(18).__getitem__ (frame.getlocal(4)).__getitem__(frame.getlocal(10))); } } } } frame.getlocal(21).invoke("setMenuBar", frame.getderef(1).__getattr__("menubar")); frame.getlocal(21).invoke("initStates", frame.getglobal("true")); frame.getderef(1).invoke ("setDefaultCloseOperation", frame.getglobal ("JFrame").__getattr__("EXIT_ON_CLOSE")); return Py.None; } private static PyObject manual_test$8(PyFrame frame) { frame.getlocal(0).invoke("setTitle", s$26); frame.getlocal(0).invoke("setSize", i$27, i$28); frame.getlocal(0).invoke("setVisible", frame.getglobal("true")); return Py.None; } private static PyObject GenericTool$9(PyFrame frame) { frame.setlocal("__init__", new PyFunction (frame.f_globals, new PyObject[] {}, c$6___init__)); frame.setlocal("manual_test", new PyFunction(frame.f_globals, new PyObject[] {}, c$7_manual_test)); return frame.getf_locals(); } private static PyObject main$10(PyFrame frame) { frame.setglobal("__file__", s$29); PyObject[] imp_accu; // Temporary Variables PyObject[] t$0$PyObject__; // Code imp_accu = org.python.core.imp.importFrom ("__future__", new String[] {"nested_scopes"}, frame); frame.setlocal("nested_scopes", imp_accu [0]); imp_accu = null; frame.setlocal("sys", org.python.core.imp.importOne("sys", frame)); org.python.core.imp.importAll("java.awt", frame); org.python.core.imp.importAll ("java.awt.event", frame); org.python.core.imp.importAll ("javax.swing", frame); org.python.core.imp.importAll ("javax.swing.event", frame); org.python.core.imp.importAll ("javax.swing.border", frame); org.python.core.imp.importAll ("javax.swing.tree", frame); org.python.core.imp.importAll ("dsx.JDockFloatPro", frame); t$0$PyObject__ = org.python.core.Py.unpackSequence(new PyTuple(new PyObject[] {i$0, i$1}), 2); frame.setlocal("false", t$0$PyObject__[0]); frame.setlocal("true", t$0$PyObject__[1]); frame.setlocal("GenericTool", Py.makeClass ("GenericTool", new PyObject[] {frame.getname ("DockFloatFrame")}, c$8_GenericTool, null, GenericTool.class)); frame.setlocal("mytool", frame.getname ("GenericTool").__call__()); frame.getname("mytool").invoke ("manual_test"); return Py.None; } } public static class ExitListener extends java.lang.Object implements java.awt.event.ActionListener, org.python.core.PyProxy, org.python.core.ClassDictInit { public void actionPerformed (java.awt.event.ActionEvent arg0) { PyObject inst = Py.jgetattr (this, "actionPerformed"); inst._jcall(new Object[] {arg0}); } public ExitListener() { super(); __initProxy__(new Object[] {}); } private PyInstance __proxy; public void _setPyInstance(PyInstance inst) { __proxy = inst; } public PyInstance _getPyInstance() { return __proxy; } private PySystemState __sysstate; public void _setPySystemState(PySystemState inst) { __sysstate = inst; } public PySystemState _getPySystemState() { return __sysstate; } public void __initProxy__(Object[] args) { Py.initProxy (this, "GenericTool", "ExitListener", args, GenericTool.jpy$packages, GenericTool.jpy$proxyProperties, null, new String[] {"GenericTool"}); } static public void classDictInit(PyObject dict) { dict.__setitem__("__supernames__", Py.java2py(new String[] {})); } } public static class LaunchListener extends java.lang.Object implements java.awt.event.ActionListener, org.python.core.PyProxy, org.python.core.ClassDictInit { public void actionPerformed (java.awt.event.ActionEvent arg0) { PyObject inst = Py.jgetattr (this, "actionPerformed"); inst._jcall(new Object[] {arg0}); } public LaunchListener() { super(); __initProxy__(new Object[] {}); } private PyInstance __proxy; public void _setPyInstance(PyInstance inst) { __proxy = inst; } public PyInstance _getPyInstance() { return __proxy; } private PySystemState __sysstate; public void _setPySystemState(PySystemState inst) { __sysstate = inst; } public PySystemState _getPySystemState() { return __sysstate; } public void __initProxy__(Object[] args) { Py.initProxy (this, "GenericTool", "LaunchListener", args, GenericTool.jpy$packages, GenericTool.jpy$proxyProperties, null, new String[] {"GenericTool"}); } static public void classDictInit(PyObject dict) { dict.__setitem__("__supernames__", Py.java2py(new String[] {})); } } public static void moduleDictInit(PyObject dict) { dict.__setitem__("__name__", new PyString ("GenericTool")); Py.runCode(new _PyInner().getMain(), dict, dict); } public static void main(String[] args) throws java.lang.Exception { String[] newargs = new String[args.length+1]; newargs[0] = "GenericTool"; System.arraycopy(args, 0, newargs, 1, args.length); Py.runMain(GenericTool._PyInner.class, newargs, GenericTool.jpy$packages, GenericTool.jpy$mainProperties, null, new String[] {"GenericTool"}); } public boolean CheckHaveFocus(java.awt.Component arg0, java.awt.Component arg1) { return super.CheckHaveFocus(arg0, arg1); } public void LoadBlock(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { super.LoadBlock(arg0, arg1, arg2); } public void LoadGeneralBlocks (java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { super.LoadGeneralBlocks(arg0, arg1, arg2); } public void LoadToolBarBlocks (java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CDockBlock arg1) throws java.lang.Exception { super.LoadToolBarBlocks(arg0, arg1); } public void LoadToolbarBlock (java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CDockBlock arg1) throws java.lang.Exception { super.LoadToolbarBlock(arg0, arg1); } public void addImpl(java.awt.Component arg0, java.lang.Object arg1, int arg2) { super.addImpl(arg0, arg1, arg2); } public java.lang.Object clone() throws java.lang.CloneNotSupportedException { return super.clone(); } public java.awt.AWTEvent coalesceEvents (java.awt.AWTEvent arg0, java.awt.AWTEvent arg1) { return super.coalesceEvents(arg0, arg1); } public javax.swing.JRootPane createRootPane() { return super.createRootPane(); } public void super__disableEvents(long arg0) { super.disableEvents(arg0); } public void super__enableEvents(long arg0) { super.enableEvents(arg0); } public void finalize() throws java.lang.Throwable { super.finalize(); } public void firePropertyChange(java.lang.String arg0, java.lang.Object arg1, java.lang.Object arg2) { super.firePropertyChange(arg0, arg1, arg2); } public void frameInit() { super.frameInit(); } public boolean isRootPaneCheckingEnabled() { return super.isRootPaneCheckingEnabled(); } public void onFocusLost(java.lang.Object arg0) { super.onFocusLost(arg0); } public void onKeyPressed(java.awt.event.KeyEvent arg0) { super.onKeyPressed(arg0); } public void onMenuSelected() { super.onMenuSelected(); } public void onMouseClicked(java.awt.AWTEvent arg0) { super.onMouseClicked(arg0); } public void onResize(java.awt.event.ComponentEvent arg0) { super.onResize(arg0); } public java.lang.String paramString() { return super.paramString(); } public void processComponentEvent (java.awt.event.ComponentEvent arg0) { super.processComponentEvent(arg0); } public void processContainerEvent (java.awt.event.ContainerEvent arg0) { super.processContainerEvent(arg0); } public void processEvent(java.awt.AWTEvent arg0) { super.processEvent(arg0); } public void processFocusEvent (java.awt.event.FocusEvent arg0) { super.processFocusEvent(arg0); } public void processHierarchyBoundsEvent (java.awt.event.HierarchyEvent arg0) { super.processHierarchyBoundsEvent(arg0); } public void processHierarchyEvent (java.awt.event.HierarchyEvent arg0) { super.processHierarchyEvent(arg0); } public void processInputMethodEvent (java.awt.event.InputMethodEvent arg0) { super.processInputMethodEvent(arg0); } public void processKeyEvent (java.awt.event.KeyEvent arg0) { super.processKeyEvent(arg0); } public void processMouseEvent (java.awt.event.MouseEvent arg0) { super.processMouseEvent(arg0); } public void processMouseMotionEvent (java.awt.event.MouseEvent arg0) { super.processMouseMotionEvent(arg0); } public void processWindowEvent (java.awt.event.WindowEvent arg0) { super.processWindowEvent(arg0); } public void setCenterPane(java.awt.Component arg0) { super.setCenterPane(arg0); } public void setMenuBar (dsx.JDockFloatPro.DockFloatMenuBar arg0) { super.setMenuBar(arg0); } public void setRootPane(javax.swing.JRootPane arg0) { super.setRootPane(arg0); } public void setRootPaneCheckingEnabled(boolean arg0) { super.setRootPaneCheckingEnabled(arg0); } public void validateTree() { super.validateTree(); } public GenericTool() { super(); __initProxy__(new Object[] {}); } private PyInstance __proxy; public void _setPyInstance(PyInstance inst) { __proxy = inst; } public PyInstance _getPyInstance() { return __proxy; } private PySystemState __sysstate; public void _setPySystemState(PySystemState inst) { __sysstate = inst; } public PySystemState _getPySystemState() { return __sysstate; } public void __initProxy__(Object[] args) { Py.initProxy (this, "GenericTool", "GenericTool", args, GenericTool.jpy$packages, GenericTool.jpy$proxyProperties, null, new String[] {"GenericTool"}); } static public void classDictInit(PyObject dict) { dict.__setitem__("__supernames__", Py.java2py (new String[] {"processInputMethodEvent", "processHierarchyEvent", "p rocessKeyEvent", "setCenterPane", "addImpl", "processHi erarchyBoundsEvent", "onKeyPressed", "firePropertyChang e", "paramString", "setRootPaneCheckingEnabled", "LoadT oolbarBlock", "processWindowEvent", "onMenuSelected", " coalesceEvents", "clone", "setRootPane", "processMouseE vent", "isRootPaneCheckingEnabled", "super__enableEvent s", "onFocusLost", "processEvent", "onMouseClicked", "v alidateTree", "setMenuBar", "processContainerEvent", "f inalize", "super__disableEvents", "onResize", "processC omponentEvent", "CheckHaveFocus", "processFocusEvent", "LoadToolBarBlocks", "createRootPane", "LoadBlock", "Lo adGeneralBlocks", "frameInit", "processMouseMotionEvent "})); } } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=501470&group_id=12867 |