|
|
|
Matthew Fulmer
|
Hi. I'm looking over the various layout policies available in
Morphic for one that aligns morphs in rows and columns (a grid layout). I see there is a TableLayout, but looking thru the code, it does not lay things out in a table (or grid), at all, but in a single row or column. In most user interfaces, dialog boxes are nearly always made up of widgets aligned in rows and column, with some widgets spanning several rows or columns. If anyone has something like that, I'd be grateful for it. I've been tasked to fix up the layout of some tweak dialog boxes in Cobalt, and discovered that Tweak's layout code is word-for-word identical to Morphic's, so anything anyone has in Morphic will work just fine for me. -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Michael Rueger
|
There is a package "Grit" we are using in Sophie. It is for Tweak, but
it should be possible to adapt it to Morphic. http://source.opensophie.org/Sophie/Grit-pe.56.mcz There should be documentation somewhere, need to find it though... Michael On Mon, Jan 19, 2009 at 5:25 AM, Matthew Fulmer <[hidden email]> wrote: > Hi. I'm looking over the various layout policies available in > Morphic for one that aligns morphs in rows and columns (a grid > layout). I see there is a TableLayout, but looking thru the > code, it does not lay things out in a table (or grid), at all, > but in a single row or column. > > In most user interfaces, dialog boxes are nearly always made up > of widgets aligned in rows and column, with some widgets > spanning several rows or columns. > > If anyone has something like that, I'd be grateful for it. I've > been tasked to fix up the layout of some tweak dialog boxes in > Cobalt, and discovered that Tweak's layout code is word-for-word > identical to Morphic's, so anything anyone has in Morphic will > work just fine for me. > > -- > Matthew Fulmer -- http://mtfulmer.wordpress.com/ > _______________________________________________ > UI mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/ui > UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
|
Karl Ramberg
|
In reply to this post
by Matthew Fulmer
Matthew Fulmer wrote:
> Hi. I'm looking over the various layout policies available in > Morphic for one that aligns morphs in rows and columns (a grid > layout). I see there is a TableLayout, but looking thru the > code, it does not lay things out in a table (or grid), at all, > but in a single row or column. > > In most user interfaces, dialog boxes are nearly always made up > of widgets aligned in rows and column, with some widgets > spanning several rows or columns. > > If anyone has something like that, I'd be grateful for it. I've > been tasked to fix up the layout of some tweak dialog boxes in > Cobalt, and discovered that Tweak's layout code is word-for-word > identical to Morphic's, so anything anyone has in Morphic will > work just fine for me. > > SFC-Layout-kfr.1.mcz <http://www.squeaksource.com/HtmlTableMorph/SFC-Layout-kfr.1.mcz> It's in http://www.squeaksource.com/HtmlTableMorph.html Karl _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Matthew Fulmer
|
In reply to this post
by Michael Rueger
On Mon, Jan 19, 2009 at 09:22:08AM +0100, Michael Rueger wrote:
> There is a package "Grit" we are using in Sophie. It is for Tweak, but > it should be possible to adapt it to Morphic. > http://source.opensophie.org/Sophie/Grit-pe.56.mcz > There should be documentation somewhere, need to find it though... Thanks. It looks like much more than a layout policy, but I think I may be able to use it. I'm working in Tweak, so it's a little less of a hassle to use this package. -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Matthew Fulmer
|
In reply to this post
by Karl Ramberg
On Mon, Jan 19, 2009 at 06:36:35PM +0100, Karl Ramberg wrote:
> Matthew Fulmer wrote: > > Hi. I'm looking over the various layout policies available in > > Morphic for one that aligns morphs in rows and columns (a grid > > layout). I see there is a TableLayout, but looking thru the > > code, it does not lay things out in a table (or grid), at all, > > but in a single row or column. > > > > In most user interfaces, dialog boxes are nearly always made up > > of widgets aligned in rows and column, with some widgets > > spanning several rows or columns. > > > > If anyone has something like that, I'd be grateful for it. I've > > been tasked to fix up the layout of some tweak dialog boxes in > > Cobalt, and discovered that Tweak's layout code is word-for-word > > identical to Morphic's, so anything anyone has in Morphic will > > work just fine for me. > > > > > I have used a change set mailed by (Alain Plantec ?) to the list years ago: > SFC-Layout-kfr.1.mcz > <http://www.squeaksource.com/HtmlTableMorph/SFC-Layout-kfr.1.mcz> > It's in http://www.squeaksource.com/HtmlTableMorph.html Oh wow. This is perfect. Do you know if it is MIT licensed? I'd like to incorperate this into Cobalt. -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Matthew Fulmer
|
In reply to this post
by Karl Ramberg
On Mon, Jan 19, 2009 at 06:36:35PM +0100, Karl Ramberg wrote:
> Matthew Fulmer wrote: > > Hi. I'm looking over the various layout policies available in > > Morphic for one that aligns morphs in rows and columns (a grid > > layout). I see there is a TableLayout, but looking thru the > > code, it does not lay things out in a table (or grid), at all, > > but in a single row or column. > > > > In most user interfaces, dialog boxes are nearly always made up > > of widgets aligned in rows and column, with some widgets > > spanning several rows or columns. > > > > If anyone has something like that, I'd be grateful for it. I've > > been tasked to fix up the layout of some tweak dialog boxes in > > Cobalt, and discovered that Tweak's layout code is word-for-word > > identical to Morphic's, so anything anyone has in Morphic will > > work just fine for me. > > > > > I have used a change set mailed by (Alain Plantec ?) to the list years ago: > SFC-Layout-kfr.1.mcz > <http://www.squeaksource.com/HtmlTableMorph/SFC-Layout-kfr.1.mcz> > It's in http://www.squeaksource.com/HtmlTableMorph.html Yes, it was Alain. The email is http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-April/077324.html -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Karl Ramberg
|
In reply to this post
by Matthew Fulmer
Matthew Fulmer wrote:
> On Mon, Jan 19, 2009 at 06:36:35PM +0100, Karl Ramberg wrote: > >> Matthew Fulmer wrote: >> >>> Hi. I'm looking over the various layout policies available in >>> Morphic for one that aligns morphs in rows and columns (a grid >>> layout). I see there is a TableLayout, but looking thru the >>> code, it does not lay things out in a table (or grid), at all, >>> but in a single row or column. >>> >>> In most user interfaces, dialog boxes are nearly always made up >>> of widgets aligned in rows and column, with some widgets >>> spanning several rows or columns. >>> >>> If anyone has something like that, I'd be grateful for it. I've >>> been tasked to fix up the layout of some tweak dialog boxes in >>> Cobalt, and discovered that Tweak's layout code is word-for-word >>> identical to Morphic's, so anything anyone has in Morphic will >>> work just fine for me. >>> >>> >>> >> I have used a change set mailed by (Alain Plantec ?) to the list years ago: >> SFC-Layout-kfr.1.mcz >> <http://www.squeaksource.com/HtmlTableMorph/SFC-Layout-kfr.1.mcz> >> It's in http://www.squeaksource.com/HtmlTableMorph.html >> > > Oh wow. This is perfect. Do you know if it is MIT licensed? I'd > like to incorperate this into Cobalt. > > who the author is... Some comments are in French in there and initials where af or ap I think. Alain Plantec ? Not much help... But the code is great for what it does and I wish we had it in the base image :-) I'll digg some more... Karl _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Matthew Fulmer
|
In reply to this post
by Matthew Fulmer
On Mon, Jan 19, 2009 at 05:19:02PM -0500, Matthew Fulmer wrote:
> > I have used a change set mailed by (Alain Plantec ?) to the list years ago: > > SFC-Layout-kfr.1.mcz > > <http://www.squeaksource.com/HtmlTableMorph/SFC-Layout-kfr.1.mcz> > > It's in http://www.squeaksource.com/HtmlTableMorph.html > > Oh wow. This is perfect. Do you know if it is MIT licensed? I'd > like to incorperate this into Cobalt. Hi Alain. I'd like to use your SFGridLayout in Cobalt, which has a strict MIT licensing requirement. May I assume that is OK with you? This package comes from your 2004 email: http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-April/077324.html -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Karl Ramberg
|
In reply to this post
by Matthew Fulmer
Matthew Fulmer wrote:
> On Mon, Jan 19, 2009 at 06:36:35PM +0100, Karl Ramberg wrote: > >> Matthew Fulmer wrote: >> >>> Hi. I'm looking over the various layout policies available in >>> Morphic for one that aligns morphs in rows and columns (a grid >>> layout). I see there is a TableLayout, but looking thru the >>> code, it does not lay things out in a table (or grid), at all, >>> but in a single row or column. >>> >>> In most user interfaces, dialog boxes are nearly always made up >>> of widgets aligned in rows and column, with some widgets >>> spanning several rows or columns. >>> >>> If anyone has something like that, I'd be grateful for it. I've >>> been tasked to fix up the layout of some tweak dialog boxes in >>> Cobalt, and discovered that Tweak's layout code is word-for-word >>> identical to Morphic's, so anything anyone has in Morphic will >>> work just fine for me. >>> >>> >>> >> I have used a change set mailed by (Alain Plantec ?) to the list years ago: >> SFC-Layout-kfr.1.mcz >> <http://www.squeaksource.com/HtmlTableMorph/SFC-Layout-kfr.1.mcz> >> It's in http://www.squeaksource.com/HtmlTableMorph.html >> > > Oh wow. This is perfect. Do you know if it is MIT licensed? I'd > like to incorperate this into Cobalt. > > alain rastoul (alr) <http://map1.squeakfoundation.org/accountbyid/4c04f93d-f0b0-428d-bf49-fb346abf5d5a> Karl _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Matthew Fulmer
|
On Mon, Jan 19, 2009 at 11:40:53PM +0100, Karl Ramberg wrote:
> Found him on Squeakmap: > alain rastoul (alr) > <http://map1.squeakfoundation.org/accountbyid/4c04f93d-f0b0-428d-bf49-fb346abf5d5a> Oops. I already sent Alain Plantec an email. Thank you for double checking. I sent Alain Rastoul an email too. -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Brian Brown-2
|
In reply to this post
by Matthew Fulmer
Have you ever taken a look at GuidedLayout on squeaksource? I
definitely does grids, among other things, and its MIT - Brian On Jan 19, 2009, at 3:40 PM, Matthew Fulmer <[hidden email]> wrote: > On Mon, Jan 19, 2009 at 05:19:02PM -0500, Matthew Fulmer wrote: >>> I have used a change set mailed by (Alain Plantec ?) to the list >>> years ago: >>> SFC-Layout-kfr.1.mcz >>> <http://www.squeaksource.com/HtmlTableMorph/SFC-Layout-kfr.1.mcz> >>> It's in http://www.squeaksource.com/HtmlTableMorph.html >> >> Oh wow. This is perfect. Do you know if it is MIT licensed? I'd >> like to incorperate this into Cobalt. > > Hi Alain. I'd like to use your SFGridLayout in Cobalt, which has > a strict MIT licensing requirement. May I assume that is OK with > you? > > This package comes from your 2004 email: > http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-April/077324.html > > -- > Matthew Fulmer -- http://mtfulmer.wordpress.com/ > _______________________________________________ > UI mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/ui UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Matthew Fulmer
|
Some javascript/style in this post has been disabled (why?)
On Mon, Jan 19, 2009 at 07:00:04PM -0700, Brian Brown wrote:
> Have you ever taken a look at GuidedLayout on squeaksource? I > definitely does grids, among other things, and its MIT No, I haven't. I was in the middle of writing my own when I got your email. I don't get what it does or how to use it. It needs more comments. the one I'm working on is based on https://tablelayout.dev.java.net/ which I was told in #squeak is the easiest one to use of all he's tried. I attached the javadoc HTML page which overviews how to use it, which is all I used of it. I'm about 60% through implementing it, and it looks to be 5 classes and about 40 methods, plus lots of comments. I'm writing it for Tweak, but it should be straightforward to port to Morphic, as the layout code is nearly identical between them (just a half-dozen methods with different names) I'm writing it because we have a lot of traditional dialog boxes we need to layout in Cobalt. PS. I made a trivial fix to GuidedLayout. I changed all _ assignments to := so that it can load in Cobalt: http://www.duke.edu/~mtf4/GuidedLayout-mtf.20.mcz -- Matthew Fulmer -- http://mtfulmer.wordpress.com/
info.clearthought.layout
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Nested Class Summary | |
|---|---|
static class |
TableLayout.Entry
|
| Field Summary | |
|---|---|
protected static int |
C
Indicates a column |
protected static boolean |
checkForComponentOrientationSupport
Used to minimize reflection calls |
protected int[][] |
crOffset
Offsets of crs in pixels. |
protected int[][] |
crSize
Sizes of crs in pixels |
protected double[][] |
crSpec
Sizes of crs expressed in absolute and relative terms |
protected static double[][] |
defaultSize
Default row/column size |
protected boolean |
dirty
Indicates whether or not the size of the cells are known for the last known size of the container. |
protected int |
hGap
Horizontal gap between columns |
protected java.util.LinkedList |
list
List of components and their sizes |
protected static java.lang.reflect.Method |
methodGetComponentOrientation
Method used to get component orientation while preserving compatability with earlier versions of java.awt.Container. |
protected int |
oldHeight
Previous known height of the container |
protected int |
oldWidth
Previous known width of the container |
protected static int |
R
Indicates a row |
protected int |
vGap
Vertical gap between rows |
| Fields inherited from interface info.clearthought.layout.TableLayoutConstants |
|---|
BOTTOM, CENTER, FILL, FULL, LEADING, LEFT, MINIMUM, PREFERRED, RIGHT, TOP, TRAILING |
| Constructor Summary | |
|---|---|
TableLayout()
Constructs an instance of TableLayout. |
|
TableLayout(double[][] size)
Constructs an instance of TableLayout. |
|
TableLayout(double[] col,
double[] row)
Constructs an instance of TableLayout. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(java.awt.Component component,
java.lang.Object constraint)
Adds the specified component with the specified name to the layout. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component component)
Adds the specified component with the specified name to the layout. |
protected int |
assignAbsoluteSize(int z,
int availableSize)
Assigns absolute sizes. |
protected void |
assignFillSize(int z,
int availableSize)
Assigns FILL sizes. |
protected int |
assignPrefMinSize(int z,
int availableSize,
double typeOfSize)
Assigned sizes to preferred and minimum size columns and rows. |
protected int |
assignRelativeSize(int z,
int availableSize)
Assigns relative sizes. |
protected java.awt.Dimension |
calculateLayoutSize(java.awt.Container container,
double typeOfSize)
Calculates the preferred or minimum size for the methods preferredLayoutSize and minimumLayoutSize. |
protected int |
calculateLayoutSize(java.awt.Container container,
int z,
double typeOfSize,
TableLayout.Entry[] entryList,
java.awt.Dimension[] prefMinSize)
Calculates the preferred or minimum size for the method calculateLayoutSize(Container container, double typeOfSize). |
protected void |
calculateOffset(int z,
java.awt.Insets inset)
Calculates the offset of each cr. |
protected void |
calculateSize(java.awt.Container container)
Calculates the sizes of the rows and columns based on the absolute and relative sizes specified in crSpec[R] and crSpec[C]
and the size of the container. |
protected int[] |
calculateSizeAndOffset(TableLayout.Entry entry,
int preferredSize,
boolean isColumn)
Calculates the vertical/horizontal offset and size of a component. |
void |
deleteColumn(int i)
Deletes a column in this layout. |
protected void |
deleteCr(int z,
int i)
Deletes a cr for the methods deleteRow or deleteColumn. |
void |
deleteRow(int i)
Deletes a row in this layout. |
double[] |
getColumn()
Gets the sizes of columns in this layout. |
double |
getColumn(int i)
Gets the width of a single column in this layout. |
protected java.awt.ComponentOrientation |
getComponentOrientation(java.awt.Container container)
Gets the container's component orientation. |
TableLayoutConstraints |
getConstraints(java.awt.Component component)
Gets the constraints of a given component. |
int |
getHGap()
Gets the horizontal gap between colunns. |
java.util.List |
getInvalidEntry()
Determines whether or not there are any components with invalid constraints. |
float |
getLayoutAlignmentX(java.awt.Container parent)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container parent)
Returns the alignment along the y axis. |
int |
getNumColumn()
Gets the number of columns in this layout. |
int |
getNumRow()
Gets the number of rows in this layout. |
java.util.List |
getOverlappingEntry()
Gets a list of overlapping components and their constraints. |
double[] |
getRow()
Gets the height of a single row in this layout. |
double |
getRow(int i)
Gets the sizes of a row in this layout. |
int |
getVGap()
Gets the vertical gap between rows. |
protected void |
init(double[] col,
double[] row)
Initializes the TableLayout for all constructors. |
void |
insertColumn(int i,
double size)
Inserts a column in this layout. |
void |
insertCr(int z,
int i,
double size)
Inserts a cr for the methods insertRow or insertColumn. |
void |
insertRow(int i,
double size)
Inserts a row in this layout. |
void |
invalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
void |
layoutContainer(java.awt.Container container)
To lay out the specified container using this layout. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
Returns the maximum dimensions for this layout given the components in the specified target container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container container)
Determines the minimum size of the container argument using this layout. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container container)
Determines the preferred size of the container argument using this layout. |
void |
removeLayoutComponent(java.awt.Component component)
Removes the specified component from the layout. |
void |
setColumn(double[] column)
Adjusts the number and sizes of rows in this layout. |
void |
setColumn(int i,
double size)
Adjusts the width of a single column in this layout. |
void |
setConstraints(java.awt.Component component,
TableLayoutConstraints constraint)
Sets the constraints of a given component. |
protected void |
setCr(int z,
double[] size)
Sets the sizes of rows or columns for the methods setRow or setColumn. |
protected void |
setCr(int z,
int i,
double size)
Sets the sizes of rows or columns for the methods setRow or setColumn. |
void |
setHGap(int hGap)
Sets the horizontal gap between colunns. |
void |
setRow(double[] row)
Adjusts the number and sizes of rows in this layout. |
void |
setRow(int i,
double size)
Adjusts the height of a single row in this layout. |
void |
setVGap(int vGap)
Sets the vertical gap between rows. |
java.lang.String |
toString()
Converts this TableLayout to a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final double[][] defaultSize
protected static final int C
protected static final int R
protected static boolean checkForComponentOrientationSupport
protected static java.lang.reflect.Method methodGetComponentOrientation
protected double[][] crSpec
protected int[][] crSize
protected int[][] crOffset
protected java.util.LinkedList list
protected boolean dirty
protected int oldWidth
protected int oldHeight
protected int hGap
protected int vGap
| Constructor Detail |
|---|
public TableLayout()
public TableLayout(double[][] size)
size - widths of columns and heights of rows in the format,
{{col0, col1, col2, ..., colN}, {row0, row1, row2, ..., rowM}}
If this parameter is invalid, the TableLayout will have
exactly one row and one column.
public TableLayout(double[] col,
double[] row)
col - widths of columns in the format, {{col0, col1, col2, ..., colN}row - heights of rows in the format, {{row0, row1, row2, ..., rowN}| Method Detail |
|---|
protected void init(double[] col,
double[] row)
col - widths of columns in the format, {{col0, col1, col2, ..., colN}row - heights of rows in the format, {{row0, row1, row2, ..., rowN}public TableLayoutConstraints getConstraints(java.awt.Component component)
component - desired component
public void setConstraints(java.awt.Component component,
TableLayoutConstraints constraint)
component - desired component. This parameter cannot be null.constraint - new set of constraints. This parameter cannot be null.public void setColumn(double[] column)
layout.layoutContainer(container);
container.repaint();
or
window.pack()
If this is not done, the changes in the layout will not be seen until the
container is resized.
column - widths of each of the columnsgetColumn()public void setRow(double[] row)
layout.layoutContainer(container);
container.repaint();
or
window.pack()
If this is not done, the changes in the layout will not be seen until the
container is resized.
row - heights of each of the rows. This parameter cannot be null.getRow()
protected void setCr(int z,
double[] size)
z - indicates row or columnsize - new cr size
public void setColumn(int i,
double size)
layout.layoutContainer(container);
container.repaint();
or
window.pack()
If this is not done, the changes in the layout will not be seen until the
container is resized.
i - zero-based index of column to set. If this parameter is not
valid, an ArrayOutOfBoundsException will be thrown.size - width of the column. This parameter cannot be null.getColumn()
public void setRow(int i,
double size)
layout.layoutContainer(container);
container.repaint();
or
window.pack()
If this is not done, the changes in the layout will not be seen until the
container is resized.
i - zero-based index of row to set. If this parameter is not
valid, an ArrayOutOfBoundsException will be thrown.size - height of the row. This parameter cannot be null.getRow()
protected void setCr(int z,
int i,
double size)
z - indicates row or columni - indicates which cr to resizesize - new cr sizepublic double[] getColumn()
setColumn(double[])public double[] getRow()
setRow(double[])public double getColumn(int i)
i - zero-based index of row to get. If this parameter is not valid,
an ArrayOutOfBoundsException will be thrown.
setRow(double[])public double getRow(int i)
i - zero-based index of row to get. If this parameter is not valid,
an ArrayOutOfBoundsException will be thrown.
setRow(double[])public int getNumColumn()
public int getNumRow()
public int getHGap()
public int getVGap()
public void setHGap(int hGap)
hGap - the horizontal gap in pixelspublic void setVGap(int vGap)
vGap - the horizontal gap in pixels
public void insertColumn(int i,
double size)
setColumn.
i - zero-based index at which to insert the columnsize - size of the column to be insertedsetColumn(double[]),
deleteColumn(int)
public void insertRow(int i,
double size)
setRow.
i - zero-based index at which to insert the rowsize - size of the row to be insertedsetRow(double[]),
deleteRow(int)
public void insertCr(int z,
int i,
double size)
z - indicates row or columni - zero-based index at which to insert the crsize - size of cr being insertedpublic void deleteColumn(int i)
setColumn.
i - zero-based index of column to deletesetColumn(double[]),
deleteColumn(int)public void deleteRow(int i)
setRow. There must be at least two rows in order
to delete a row.
i - zero-based index of row to deletesetRow(double[]),
deleteRow(int)
protected void deleteCr(int z,
int i)
z - indicates row or columni - zero-based index of cr to deletepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List getInvalidEntry()
getOverlappingEntry()public java.util.List getOverlappingEntry()
getInvalidEntry()protected void calculateSize(java.awt.Container container)
crSpec[R] and crSpec[C]
and the size of the container. The result is stored in crSize[R]
and crSize[C].
container - container using this TableLayout
protected int assignAbsoluteSize(int z,
int availableSize)
z - indicates row or columnavailableSize - amount of space available in the container
protected int assignRelativeSize(int z,
int availableSize)
z - indicates row or columnavailableSize - amount of space available in the container
protected void assignFillSize(int z,
int availableSize)
z - indicates row or columnavailableSize - amount of space available in the container
protected void calculateOffset(int z,
java.awt.Insets inset)
z - indicates row or column
protected int assignPrefMinSize(int z,
int availableSize,
double typeOfSize)
z - indicates row or columnavailableSize - amount of space available in the containertypeOfSize - indicates preferred or minimum
public void layoutContainer(java.awt.Container container)
User code should not have to call this method directly.
layoutContainer in interface java.awt.LayoutManagercontainer - container being served by this layout managerprotected java.awt.ComponentOrientation getComponentOrientation(java.awt.Container container)
container - Container whose orientation is being queried
protected int[] calculateSizeAndOffset(TableLayout.Entry entry, int preferredSize, boolean isColumn)
entry - entry containing component and contraintspreferredSize - previously calculated preferred width/height of
componentisColumn - if true, this method is being called to calculate
the offset/size of a column. if false,... of a row.
public java.awt.Dimension preferredLayoutSize(java.awt.Container container)
preferredLayoutSize in interface java.awt.LayoutManagercontainer - container being served by this layout manager
public java.awt.Dimension minimumLayoutSize(java.awt.Container container)
minimumLayoutSize in interface java.awt.LayoutManagercontainer - container being served by this layout manager
protected java.awt.Dimension calculateLayoutSize(java.awt.Container container,
double typeOfSize)
container - container whose size is being calculatedtypeOfSize - indicates preferred or minimum
protected int calculateLayoutSize(java.awt.Container container,
int z,
double typeOfSize,
TableLayout.Entry[] entryList,
java.awt.Dimension[] prefMinSize)
container - container whose size is being calculatedz - indicates row or columntypeOfSize - indicates preferred or minimumentryList - list of Entry objectsprefMinSize - list of preferred or minimum sizes
public void addLayoutComponent(java.lang.String name,
java.awt.Component component)
addLayoutComponent in interface java.awt.LayoutManagername - indicates entry's position and anchorcomponent - component to add
public void addLayoutComponent(java.awt.Component component,
java.lang.Object constraint)
addLayoutComponent in interface java.awt.LayoutManager2component - component to addconstraint - indicates entry's position and alignmentpublic void removeLayoutComponent(java.awt.Component component)
removeLayoutComponent in interface java.awt.LayoutManagercomponent - component being removedpublic java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize in interface java.awt.LayoutManager2target - the component which needs to be laid out
public float getLayoutAlignmentX(java.awt.Container parent)
getLayoutAlignmentX in interface java.awt.LayoutManager2public float getLayoutAlignmentY(java.awt.Container parent)
getLayoutAlignmentY in interface java.awt.LayoutManager2public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
|
Alain Plantec
|
In reply to this post
by Matthew Fulmer
Matthew Fulmer a écrit :
> On Mon, Jan 19, 2009 at 05:19:02PM -0500, Matthew Fulmer wrote: > >>> I have used a change set mailed by (Alain Plantec ?) to the list years ago: >>> SFC-Layout-kfr.1.mcz >>> <http://www.squeaksource.com/HtmlTableMorph/SFC-Layout-kfr.1.mcz> >>> It's in http://www.squeaksource.com/HtmlTableMorph.html >>> >> Oh wow. This is perfect. Do you know if it is MIT licensed? I'd >> like to incorperate this into Cobalt. >> > > Hi Alain. I'd like to use your SFGridLayout in Cobalt, which has > a strict MIT licensing requirement. May I assume that is OK with > you? > It would have been with pleasure but unfortunately this package and the email are not from me. Cheers, Alain > This package comes from your 2004 email: > http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-April/077324.html > > _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
|
Brian Brown-2
|
In reply to this post
by Matthew Fulmer
On Jan 19, 2009, at 9:56 PM, Matthew Fulmer wrote: > On Mon, Jan 19, 2009 at 07:00:04PM -0700, Brian Brown wrote: >> Have you ever taken a look at GuidedLayout on squeaksource? I >> definitely does grids, among other things, and its MIT > > No, I haven't. I was in the middle of writing my own when I got > your email. > > I don't get what it does or how to use it. It needs more > comments. > Hmm, I thought there were a few sample methods on the class side, but I haven't looked at for a while... > the one I'm working on is based on > https://tablelayout.dev.java.net/ > > which I was told in #squeak is the easiest one to use of all > he's tried. I attached the javadoc HTML page which overviews how > to use it, which is all I used of it. I'm about 60% through > implementing it, and it looks to be 5 classes and about 40 > methods, plus lots of comments. I'm writing it for Tweak, but it > should be straightforward to port to Morphic, as the layout code > is nearly identical between them (just a half-dozen methods with > different names) > > I'm writing it because we have a lot of traditional dialog boxes > we need to layout in Cobalt. > > PS. I made a trivial fix to GuidedLayout. I changed all _ > assignments to := so that it can load in Cobalt: > http://www.duke.edu/~mtf4/GuidedLayout-mtf.20.mcz > > -- > Matthew Fulmer -- http://mtfulmer.wordpress.com/ > <TableLayout.html>_______________________________________________ > UI mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/ui _______________________________________________ UI mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/ui |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |