Package eu.bandm.tools.graficUtils
Class MultiLineFlowLayout
java.lang.Object
java.awt.FlowLayout
eu.bandm.tools.graficUtils.MultiLineFlowLayout
- All Implemented Interfaces:
LayoutManager
,Serializable
Needed for the contents of the option arguments JPanel.
This contents is a sequence of widgets for data input (or groups thereof!), and they should "flow" in the lines which make up a block in the right half of the top-level "grid-bag".
(The normal "FlowLayout" from javax.swing does not respect a maximum size, but makes the container above grow beyond all limits, so no line break would ever happen.)
WE FOUND THIS CODE SOMEWHERE IN THE NET, BUT DID NOT MEMORIZE !?!?!
We tried to find it again (for reasons of acknowledgement), but failed.
((There is a DIFFERENT approach with the same name at
There is another alternative at http://softech.informatik.uni-kl.de/twiki/pub/Homepage/ProgrammBeispieleBuch/Programme-KooP-Buch/kap5/layoutManagen/TextLayout.java
Finally: https://svn2.assembla.com/svn/savant/MedSavant/branches/b5/MedSavant/src/org/ut/biolab/medsavant/view/swing/WrapLayout.java This seems derived from the same source as ours, but no acknowledgement either !?
This contents is a sequence of widgets for data input (or groups thereof!), and they should "flow" in the lines which make up a block in the right half of the top-level "grid-bag".
(The normal "FlowLayout" from javax.swing does not respect a maximum size, but makes the container above grow beyond all limits, so no line break would ever happen.)
WE FOUND THIS CODE SOMEWHERE IN THE NET, BUT DID NOT MEMORIZE !?!?!
We tried to find it again (for reasons of acknowledgement), but failed.
((There is a DIFFERENT approach with the same name at
Copyright (c) 2007, Distributed Computing Group (DCG) ETH Zurich Switzerland dcg.ethz.ch))
There is another alternative at http://softech.informatik.uni-kl.de/twiki/pub/Homepage/ProgrammBeispieleBuch/Programme-KooP-Buch/kap5/layoutManagen/TextLayout.java
Finally: https://svn2.assembla.com/svn/savant/MedSavant/branches/b5/MedSavant/src/org/ut/biolab/medsavant/view/swing/WrapLayout.java This seems derived from the same source as ours, but no acknowledgement either !?
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
minimumLayoutSize
(Container target) preferredLayoutSize
(Container target) Methods inherited from class java.awt.FlowLayout
addLayoutComponent, getAlignment, getAlignOnBaseline, getHgap, getVgap, layoutContainer, removeLayoutComponent, setAlignment, setAlignOnBaseline, setHgap, setVgap, toString
-
Constructor Details
-
MultiLineFlowLayout
protected MultiLineFlowLayout() -
MultiLineFlowLayout
protected MultiLineFlowLayout(int align)
-
-
Method Details
-
getPreferredLineWidth
public abstract int getPreferredLineWidth() -
preferredLayoutSize
- Specified by:
preferredLayoutSize
in interfaceLayoutManager
- Overrides:
preferredLayoutSize
in classFlowLayout
-
minimumLayoutSize
- Specified by:
minimumLayoutSize
in interfaceLayoutManager
- Overrides:
minimumLayoutSize
in classFlowLayout
-