VE failed to parse public final static Dimention() const of base class [message #614639] |
Thu, 21 September 2006 10:01 |
Alexey Kuznetsov Messages: 42 Registered: July 2009 |
Member |
|
|
Here 2 classes: base class and its descendant (VisTest)
Public const DIM_0_32 is declared in base class.
When I try to open VisTest in VE it show panel with blue info sign and
show in hint that '...DIM_0_32 is to complicated...' I think this is a
kind of bug.
At run time all works fine.
I use lates VE with Eclipse 3.2 M20060919-1045
------------------------------------------------------------ ----
package ve.test;
import java.awt.Dimension;
import javax.swing.JDialog;
public class VisBase extends JDialog
{
public final static Dimension DIM_0_32 = new Dimension(0, 32);
}
------------------------------------------------------------ ----
package ve.test;
import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.JPanel;
import java.awt.Dimension;
public class VisTest extends VisBase
{
JPanel pnlLayer = null;
JPanel pnlOptions = null;
JPanel pnlButtons = null;
public VisTest()
{
super();
initialize();
}
private void initialize()
{
this.setTitle("VisTest");
this.setSize(new Dimension(437, 361));
this.setContentPane(this.getPnlLayer());
}
private JPanel getPnlLayer()
{
if (pnlLayer == null)
{
pnlLayer = new JPanel();
pnlLayer.setLayout(new BorderLayout());
pnlLayer.add(getPnlOptions(), BorderLayout.CENTER);
pnlLayer.add(getPnlButtons(), BorderLayout.SOUTH);
}
return pnlLayer;
}
private JPanel getPnlOptions()
{
if (pnlOptions == null)
{
pnlOptions = new JPanel();
pnlOptions.setBackground(Color.RED);
}
return pnlOptions;
}
private JPanel getPnlButtons()
{
if (pnlButtons == null)
{
pnlButtons = new JPanel();
pnlButtons.setPreferredSize(DIM_0_32);
pnlButtons.setBackground(Color.GREEN);
}
return pnlButtons;
}
public static void main(String[] args)
{
VisTest aDlg = new VisTest();
aDlg.setModal(true);
aDlg.setVisible(true);
System.exit(0);
}
} // @jve:decl-index=0:visual-constraint="10,10"
------------------------------------------------------------ -
|
|
|
Powered by
FUDForum. Page generated in 0.02907 seconds