Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Icons on the custom widgets in VE are not visible
Icons on the custom widgets in VE are not visible [message #87874] Wed, 20 April 2005 15:59 Go to next message
Elena Demeter is currently offline Elena DemeterFriend
Messages: 152
Registered: July 2009
Senior Member
Hello,

I have my own custom widget: panel with a button; the button has an icon
on it.

If I test my component with "Run |Java Application" I can see the icon.

If I drop my component from the palette in VE in the debug mode my icon is
not visible.

What can I do to make my icon visible ? Do I have to set some paths ?




Thank you :-)

Elena
Re: Icons on the custom widgets in VE are not visible [message #87888 is a reply to message #87874] Wed, 20 April 2005 17:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

What does the code look like that sets icon on the button? In what
method is this code called from?

Elena wrote:
> Hello,
>
> I have my own custom widget: panel with a button; the button has an icon
> on it.
> If I test my component with "Run |Java Application" I can see the icon.
>
> If I drop my component from the palette in VE in the debug mode my icon
> is not visible.
>
> What can I do to make my icon visible ? Do I have to set some paths ?
>
>
>
>
> Thank you :-)
>
> Elena
>

--
Thanks,
Rich Kulp
Re: Icons on the custom widgets in VE are not visible [message #87961 is a reply to message #87888] Thu, 21 April 2005 06:40 Go to previous messageGo to next message
Elena Demeter is currently offline Elena DemeterFriend
Messages: 152
Registered: July 2009
Senior Member
Hello,

here is the code below. I hope that the formatting is ok. You can see that
my "plusMinusButton" has an icon. And the icon is in a folder "icons" in
my plugin-project.




Thanks
Elena


------------------------------------------------------------ ----------------
public class ButtonPlusPanel extends JPanel
{



public ButtonPlusPanel()
{
super();
}



public ButtonPlusPanel(ActionListener controller, String actionCommand,
String[] resourceNames, String[] resourceKeys, String[] imageNames)
{


super();

ButtonPanel buttonPanel = new ButtonPanel(controller, resourceNames,
resourceKeys, imageNames, 6, 1, 1);


JButton plusMinusButton = new JButton(new
ImageIcon("icons/Close_Button.gif"));


this.add(buttonPanel);


this.add(plusMinusButton);


this.setVisible(true);

}
}
Re: Icons on the custom widgets in VE are not visible [message #88032 is a reply to message #87961] Thu, 21 April 2005 13:51 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

When we drop a button we use the default ctor. Since the default ctor
doesn't call any of the code in the other ctor, the other code is never
executed.


--
Thanks,
Rich Kulp
Re: Icons on the custom widgets in VE are not visible [message #607195 is a reply to message #87874] Wed, 20 April 2005 17:52 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

What does the code look like that sets icon on the button? In what
method is this code called from?

Elena wrote:
> Hello,
>
> I have my own custom widget: panel with a button; the button has an icon
> on it.
> If I test my component with "Run |Java Application" I can see the icon.
>
> If I drop my component from the palette in VE in the debug mode my icon
> is not visible.
>
> What can I do to make my icon visible ? Do I have to set some paths ?
>
>
>
>
> Thank you :-)
>
> Elena
>

--
Thanks,
Rich Kulp
Re: Icons on the custom widgets in VE are not visible [message #607200 is a reply to message #87888] Thu, 21 April 2005 06:40 Go to previous message
Elena Demeter is currently offline Elena DemeterFriend
Messages: 152
Registered: July 2009
Senior Member
Hello,

here is the code below. I hope that the formatting is ok. You can see that
my "plusMinusButton" has an icon. And the icon is in a folder "icons" in
my plugin-project.




Thanks
Elena


------------------------------------------------------------ ----------------
public class ButtonPlusPanel extends JPanel
{



public ButtonPlusPanel()
{
super();
}



public ButtonPlusPanel(ActionListener controller, String actionCommand,
String[] resourceNames, String[] resourceKeys, String[] imageNames)
{


super();

ButtonPanel buttonPanel = new ButtonPanel(controller, resourceNames,
resourceKeys, imageNames, 6, 1, 1);


JButton plusMinusButton = new JButton(new
ImageIcon("icons/Close_Button.gif"));


this.add(buttonPanel);


this.add(plusMinusButton);


this.setVisible(true);

}
}
Re: Icons on the custom widgets in VE are not visible [message #607205 is a reply to message #87961] Thu, 21 April 2005 13:51 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

When we drop a button we use the default ctor. Since the default ctor
doesn't call any of the code in the other ctor, the other code is never
executed.


--
Thanks,
Rich Kulp
Previous Topic:About Creation of Table
Next Topic:SWT controls in palette not visible, only SWING and AWT?!?
Goto Forum:
  


Current Time: Fri Apr 26 06:31:45 GMT 2024

Powered by FUDForum. Page generated in 0.02253 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top