Closed GoogleCodeExporter closed 9 years ago
Just saw that this changed to 'protected' in source. Doesn't help. Please
'public' :)
Original comment by f.bant...@axon-e.eu
on 24 Nov 2013 at 12:01
I'm not sure I follow... Are you trying to extend LayoutParameter?
Original comment by mab...@gmail.com
on 1 Dec 2013 at 1:58
No. I just want to use it in my LayoutManager like that:
public static final LayoutParameter FIRST = new LayoutParameter(
"SplitLayout.FIRST" );
which I currently can't because:
protected LayoutParameter(String description) {
this.description = description;
}
I could subclass it. But this is somewhat needless. Currently I'm reusing
another LayoutManagers parameters like: public static final LayoutParameter
FIRST = BorderLayout.LEFT; But this isn't nice, too. Or you could make the
constructor public :)
Original comment by f.bant...@axon-e.eu
on 2 Dec 2013 at 11:31
Okay, I've updated the code now on 2.1.x branch. I think the original idea for
the protected constructor was to prevent people from creating new instances of
the class when passing in parameters to the layout managers, but yes, when
writing new layout managers that would require you to subclass LayoutParameter
(or make the package name the same, which isn't very elegant). Anyhow, this
isn't such a big deal and I think the documentation on each layout manager
should be clear enough on what to pass in.
Original comment by mab...@gmail.com
on 8 Dec 2013 at 9:31
Original issue reported on code.google.com by
f.bant...@axon-e.eu
on 24 Nov 2013 at 11:03