Invalid parsing in VE 1.2RC2 [message #613336] |
Wed, 14 June 2006 06:56 |
Alexey Kuznetsov Messages: 42 Registered: July 2009 |
Member |
|
|
in VE 1.1.0.1 this sample parsed and drawing on screen correctly.
in latest VE with GEF-3.2RC3 and emf-2.2.0RC6 it behaving incorrectly.
Eclipse 3.2RC4, java1.5_06, os win2k sp4
For me it seems that problem occurs when I'm
trying to get reference to some visual object and VE going crazy.
For example in code below my method uSomeUserMethod() is the problem,
because
inside this method I'm get the reference for panel and try to do smth.
This is only an example this problem happens not only with panel it
happens with every visual object if I’m try to get reference to it...
Please help me!
P.S. sorry for bad English
//------------ sample code to show problem -------------
package test.ve.problems;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
public class VeProblemTest extends JDialog
{
private JPanel jContentPane = null;
private JPanel pnlBtns = null;
private JButton jButton1 = null;
public VeProblemTest(Frame owner)
{
super(owner);
initialize();
}
private void initialize()
{
this.setSize(357, 275);
this.setTitle("VE test");
this.setContentPane(getJContentPane());
}
private JPanel getJContentPane()
{
if (jContentPane == null)
{
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getPnlBtns(), BorderLayout.SOUTH);
}
return jContentPane;
}
private JPanel getPnlBtns()
{
if (pnlBtns == null)
{
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(1);
pnlBtns = new JPanel();
pnlBtns.setLayout(gridLayout);
pnlBtns.setPreferredSize(new Dimension(0, 32));
pnlBtns.add(getJButton1(), null);
}
return pnlBtns;
}
private JButton getJButton1()
{
if (jButton1 == null)
{
jButton1 = new JButton();
jButton1.setText("Btn1");
jButton1.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent e)
{
uSomeUserMethod();
}
});
}
return jButton1;
}
// HERE THE PROBLEM !!!
// trying to get reference to some visual object and VE going crazy
private void uSomeUserMethod()
{
// just cooment out this 2 lines and problem will disapear
JPanel aPnl = this.getPnlBtns();
aPnl.setBackground(Color.CYAN);
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.02034 seconds