Article View: borland.public.jbuilder.java.api
Article #3122Establishing visual component defaults
From: Ernie Rael
Date: Thu, 14 May 1998 00:00
Date: Thu, 14 May 1998 00:00
31 lines
1520 bytes
1520 bytes
I want to be able to set up defaults, e.g. font, for
components. With X there is the resource stuff. Is
there anything similar with java?
I'm fishing for ideas.
Otherwise i guess i can do either
1 Have a component, XJPanel, inherited from JPanel.
and handle the defaults in XJPanel.
2 Set up a factory, say X, with a method for each
component, e.g. X.JPanel() returns a configured
JPanel
2 seems better since it is more amenable to cloning
not to mention far fewer files. But with 1 i could
have a design pallete with the X components.
Seems the factory/prototype technique is at odds
with using JBuilder for visual design. I guess one
other technique would be to have a fixup factory
and do something like X.fixup(new JPanel()). This
allows use with the visual designer.
I havent thought much about how the components
search there ancesters for defaults. Something
clever here? A palette of panels with different
defaults?
Appreciate any ideas or comments.
-ernie
Technical Details
Message-ID:
<355a3e48.63856953@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,51dad95d69b7509c,start X-Google-Attributes: gid1089d0,public From: err@raelity.com (Ernie Rael) Subject: Establishing visual component defaults Date: 1998/05/14 Message-ID: <355a3e48.63856953@forums.borland.com> X-Deja-AN: 353051754 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.api