blob: 7c6e8d4c3888dd21ec971dc07617d6a9f4591874 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_201) on Thu Jul 23 15:58:39 CEST 2020 -->
<title>GridColumn</title>
<meta name="date" content="2020-07-23">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="GridColumn";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/GridColumn.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridCell.html" title="interface in org.eclipse.nebula.paperclips.core.grid"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridLook.html" title="interface in org.eclipse.nebula.paperclips.core.grid"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/eclipse/nebula/paperclips/core/grid/GridColumn.html" target="_top">Frames</a></li>
<li><a href="GridColumn.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.eclipse.nebula.paperclips.core.grid</div>
<h2 title="Class GridColumn" class="title">Class GridColumn</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.eclipse.nebula.paperclips.core.grid.GridColumn</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">GridColumn</span>
extends java.lang.Object</pre>
<div class="block">Describes the properties of a column in a GridPrint.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#align">align</a></span></code>
<div class="block">The default alignment for Prints in this column.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#DEFAULT_ALIGN">DEFAULT_ALIGN</a></span></code>
<div class="block">The default alignment used when alignment is not specified.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#DEFAULT_SIZE">DEFAULT_SIZE</a></span></code>
<div class="block">The default size used when size is not specified.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#DEFAULT_WEIGHT">DEFAULT_WEIGHT</a></span></code>
<div class="block">The default weight used when weight is not specified.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#size">size</a></span></code>
<div class="block">The size property for this GridColumn.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#weight">weight</a></span></code>
<div class="block">The weight of this column.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#GridColumn-int-int-int-">GridColumn</a></span>(int&nbsp;align,
int&nbsp;size,
int&nbsp;weight)</code>
<div class="block">Constructs a GridColumn.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html" title="class in org.eclipse.nebula.paperclips.core.grid">GridColumn</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#copy--">copy</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object&nbsp;obj)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#hashCode--">hashCode</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html" title="class in org.eclipse.nebula.paperclips.core.grid">GridColumn</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#parse-java.lang.String-">parse</a></span>(java.lang.String&nbsp;spec)</code>
<div class="block">Parses the given column spec and returns a GridColumn matching that spec.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_ALIGN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ALIGN</h4>
<pre>public static final&nbsp;int DEFAULT_ALIGN</pre>
<div class="block">The default alignment used when alignment is not specified. Value is
SWT.LEFT.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.eclipse.nebula.paperclips.core.grid.GridColumn.DEFAULT_ALIGN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_SIZE</pre>
<div class="block">The default size used when size is not specified. Value is SWT.DEFAULT.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.eclipse.nebula.paperclips.core.grid.GridColumn.DEFAULT_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_WEIGHT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_WEIGHT</h4>
<pre>public static final&nbsp;int DEFAULT_WEIGHT</pre>
<div class="block">The default weight used when weight is not specified. Value is 0.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.eclipse.nebula.paperclips.core.grid.GridColumn.DEFAULT_WEIGHT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="size">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public final&nbsp;int size</pre>
<div class="block">The size property for this GridColumn. Possible values:
<ul>
<li>GridPrint.PREFERRED - indicates that the column should be as wide as
the preferred width of its widest element.
<li>SWT.DEFAULT - Similar to GridPrint.PREFERRED, except that the column
may shrink down to its minimum width if space is scarce.
<li>A value > 0 indicates that the column should be <code>size</code>
points wide (72pts = 1").
</ul></div>
</li>
</ul>
<a name="align">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>align</h4>
<pre>public final&nbsp;int align</pre>
<div class="block">The default alignment for Prints in this column. Possible values are
SWT.LEFT, SWT.CENTER, SWT.RIGHT, or SWT.DEFAULT. Note that alignment
affects the placement of PrintPieces within the grid's cell--the
alignment elements of the PrintPiece themselves are not affected. Thus,
in order to achieve the desired effect, a Print having an alignment
property should be set to the same alignment as the grid cell it is added
to. For example, a TextPrint in a right-aligned grid cell should be set
to right alignment as well.
<p>
Cells that span multiple columns use the alignment of the left-most cell
in the cell span.</div>
</li>
</ul>
<a name="weight">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>weight</h4>
<pre>public final&nbsp;int weight</pre>
<div class="block">The weight of this column. If the available print space is wider than the
grid's preferred width, this field determines how much of that extra
space should be given to this column. A larger weight causes the column
to receive more of the extra width. A value of 0 indicates that the
column should not be given any excess width.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="GridColumn-int-int-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>GridColumn</h4>
<pre>public&nbsp;GridColumn(int&nbsp;align,
int&nbsp;size,
int&nbsp;weight)</pre>
<div class="block">Constructs a GridColumn.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>align</code> - The default alignment for Prints in this column.</dd>
<dd><code>size</code> - The size this column should be given.</dd>
<dd><code>weight</code> - The weight this column should be given.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;obj)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="parse-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parse</h4>
<pre>public static&nbsp;<a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html" title="class in org.eclipse.nebula.paperclips.core.grid">GridColumn</a>&nbsp;parse(java.lang.String&nbsp;spec)</pre>
<div class="block">Parses the given column spec and returns a GridColumn matching that spec.
<p>
Format:
<pre>
[align:]size[:grow]
align = L | LEFT |
C | CENTER |
R | RIGHT
size = P | PREF | PREFERRED |
D | DEF | DEFAULT |
(Positive number)[PT|IN|INCH|CM|MM]
weight = N | NONE |
G | GROW | G(#) | GROW(#)
</pre>
The default alignment is LEFT. The
<code>weight</code> argument expresses the weight property: NONE
indicates a weight of 0; GROW indicates a weight of 1; and GROW(3)
indicates a weight of 3. The default weight (if <code>weight</code> is
omitted) is 0.
<p>
Examples:
<pre>
LEFT:DEFAULT:GROW // left-aligned, default size, weight=1
R:72PT:N // light-aligned, 72 points (1&quot;) wide, weight=0
right:72 // identical to previous line
c:pref:none // center-aligned, preferred size, weight=0
p // left-aligned (default), preferred size, weight=0
r:2inch // right-aligned, 2 inches (50.8mm)
r:50.8mm // right-aligned, 50.8 mm (2&quot;)
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>spec</code> - the column spec that will be parsed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a GridColumn matching the column spec.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#align"><code>align</code></a>,
<a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#size"><code>size</code></a>,
<a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html#weight"><code>weight</code></a></dd>
</dl>
</li>
</ul>
<a name="copy--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>copy</h4>
<pre><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridColumn.html" title="class in org.eclipse.nebula.paperclips.core.grid">GridColumn</a>&nbsp;copy()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/GridColumn.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridCell.html" title="interface in org.eclipse.nebula.paperclips.core.grid"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/eclipse/nebula/paperclips/core/grid/GridLook.html" title="interface in org.eclipse.nebula.paperclips.core.grid"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/eclipse/nebula/paperclips/core/grid/GridColumn.html" target="_top">Frames</a></li>
<li><a href="GridColumn.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>