Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Null to Gridbag..

Joe, thanks for steering me towards the right list...  

I am using the property editor.  Also, the layout property for that
panel is coming up explicitly set (with the arrow).  I checked the log
after attempting to switch to grid back, and got a null pointer which
I'll put below.  Thanks again for the response.

This is the getJpanel method:

    private JPanel getJPanel() {
        if (jPanel == null) {
            jPanel = new JPanel();
            jLabel1 = new JLabel();
            jPanel.setLayout(null);
            jLabel = new JLabel();
            jLabel.setBounds(20, 20, 71, 19);
            jLabel.setText("Condition:");
            jLabel1.setBounds(20, 60, 71, 19);
            jLabel1.setText("Tests:");
            jPanel.add(jLabel, null);
            jPanel.add(getJcmbxConditions(), null);
            jPanel.add(jLabel1, null);
            jPanel.add(getJScrollPane5(), null);
        }
        return jPanel;
    }

and the stack trace:


!ENTRY org.eclipse.ve.propertysheet 2 0 Sep 27, 2004 07:32:18.18
!MESSAGE 
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ve.internal.jfc.core.BeanAwtUtilities.getConstants(BeanAwtUtilities.java:122)
	at org.eclipse.ve.internal.jfc.core.BeanAwtUtilities.invoke_getBounds(BeanAwtUtilities.java:306)
	at org.eclipse.ve.internal.jfc.core.GridBagLayoutPolicyHelper.getChildrenXYBounds(GridBagLayoutPolicyHelper.java:296)
	at org.eclipse.ve.internal.jfc.core.GridBagLayoutPolicyHelper.getSortedLeftEdges(GridBagLayoutPolicyHelper.java:650)
	at org.eclipse.ve.internal.jfc.core.GridBagLayoutPolicyHelper.getColumnDividerPositions(GridBagLayoutPolicyHelper.java:312)
	at org.eclipse.ve.internal.jfc.core.GridBagLayoutPolicyHelper.getGridBagConstraints(GridBagLayoutPolicyHelper.java:205)
	at org.eclipse.ve.internal.jfc.core.GridBagLayoutSwitcher.getChangeConstraintsCommand(GridBagLayoutSwitcher.java:44)
	at org.eclipse.ve.internal.jfc.core.LayoutSwitcher.getCommand(LayoutSwitcher.java:73)
	at org.eclipse.ve.internal.jfc.core.LayoutPropertyDescriptor.setValue(LayoutPropertyDescriptor.java:72)
	at org.eclipse.ve.internal.propertysheet.command.WrapperedPropertyDescriptor.setValue(WrapperedPropertyDescriptor.java:176)
	at org.eclipse.ve.internal.propertysheet.command.CommandStackPropertySheetEntry.applyTo(CommandStackPropertySheetEntry.java:119)
	at org.eclipse.ve.internal.propertysheet.command.CommandStackPropertySheetEntry.primApplyValues(CommandStackPropertySheetEntry.java:102)
	at org.eclipse.ve.internal.propertysheet.AbstractPropertySheetEntry.applyNewValue(AbstractPropertySheetEntry.java:208)
	at org.eclipse.ve.internal.propertysheet.AbstractPropertySheetEntry.applyEditorValue(AbstractPropertySheetEntry.java:185)
	at org.eclipse.ve.internal.propertysheet.AbstractPropertySheetEntry$1.applyEditorValue(AbstractPropertySheetEntry.java:122)
	at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:290)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
	at org.eclipse.core.runtime.Platform.run(Platform.java:747)
	at org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:288)
	at org.eclipse.jface.viewers.ComboBoxCellEditor.applyEditorValueAndDeactivate(ComboBoxCellEditor.java:242)
	at org.eclipse.jface.viewers.ComboBoxCellEditor.focusLost(ComboBoxCellEditor.java:252)
	at org.eclipse.jface.viewers.ComboBoxCellEditor$4.focusLost(ComboBoxCellEditor.java:154)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:108)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:954)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:978)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:963)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:833)
	at org.eclipse.swt.custom.CCombo.handleFocus(CCombo.java:643)
	at org.eclipse.swt.custom.CCombo$2.handleEvent(CCombo.java:117)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1006)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:953)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:978)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:959)
	at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2240)
	at org.eclipse.swt.widgets.Control.gtk_event_after(Control.java:1747)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1202)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3098)
	at org.eclipse.swt.internal.gtk.OS.gtk_widget_grab_focus(Native Method)
	at org.eclipse.swt.widgets.Control.forceFocus(Control.java:1377)
	at org.eclipse.swt.widgets.Composite.forceFocus(Composite.java:308)
	at org.eclipse.swt.widgets.Control.forceFocus(Control.java:1373)
	at org.eclipse.swt.widgets.Control.setFocus(Control.java:2595)
	at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:705)
	at org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEditorPart.setFocus(JavaVisualEditorPart.java:2156)
	at org.eclipse.ui.internal.WorkbenchPage$2.run(WorkbenchPage.java:471)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
	at org.eclipse.core.runtime.Platform.run(Platform.java:747)
	at org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:468)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2722)
	at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:2415)
	at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:304)
	at org.eclipse.ui.internal.EditorPane.requestActivation(EditorPane.java:127)
	at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:284)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:954)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:978)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:959)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:937)
	at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:1698)
	at org.eclipse.swt.widgets.Composite.gtk_button_press_event(Composite.java:394)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1195)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3098)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(Native Method)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:879)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_iteration(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2297)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
	at org.eclipse.core.launcher.Main.run(Main.java:704)
	at org.eclipse.core.launcher.Main.main(Main.java:688)


----- Original Message -----
From: Joe Winchester <winchest@xxxxxxxxxx>
Date: Mon, 27 Sep 2004 11:20:43 +0100
Subject: Re: [ve-dev] Null to Gridbag..
To: ve-dev@xxxxxxxxxxx

 
Hi Dave, 
 
Generally this type of question is a "how to" or "help it's broken" or
"I love/hate the Visual Editor", and the best place for this is the
newsgroup eclipse.tools.ve which is hosted on the newsgroup server
news.eclipse.org.   This mailing list is for questions and discussions
about design of the VE.
 
However,  what you describe should work.  Having laid the components
out in null layout (you can use stuff like the "Show Grid" or the
"Alignment" dialog to help get things just right) you can switch the
container's layout property to GridBagLayout using the property editor
and it will generate pretty good GridBagConstraints guesses for each
component to keep them in the same absolute position.    Are you doing
the switch using the property sheet ?  Is there anything suspicious in
the .log file in the .metadata directory in the workspace (where stack
traces get written to).
 
Best regards, 
 
Joe Winchester 
 

Please respond to ve-dev@xxxxxxxxxxx 

Sent by:        ve-dev-admin@xxxxxxxxxxx 

To:        ve-dev@xxxxxxxxxxx 
cc:         
Subject:        [ve-dev] Null to Gridbag.. 
 
 


Hi list,
 I just recently decided to jump in and start using the ve...  I've
 been using JBuilder for a long time for swing design, but love
 Eclipse.
 
 I have a gui built in <null> layout.  I did this because I *swear* I
 read somewhere that the ve would convert it to gridbag when you
 changed the layout.  No such luck, just kind of ignores me..  Any
 ideas?
 -- 
 thanks, 
 - Dave
 _______________________________________________
 ve-dev mailing list
 ve-dev@xxxxxxxxxxx
 http://dev.eclipse.org/mailman/listinfo/ve-dev
 
 









-- 
thanks, 
 - Dave


Back to the top