📄 layoutstyle.html.svn-base
字号:
UNRELATED</H3>
<PRE>
public static final int <B>UNRELATED</B></PRE>
<DL>
<DD>Possible argument to getPreferredGap. Used to indicate the two componets are not grouped together.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.sun.lwuit.layouts.LayoutStyle.UNRELATED">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="INDENT"><!-- --></A><H3>
INDENT</H3>
<PRE>
public static final int <B>INDENT</B></PRE>
<DL>
<DD>Possible argument to getPreferredGap. Used to indicate the distance to indent a component is being requested. To visually indicate a set of related components they will often times be horizontally indented, the <code>INDENT</code> constant for this. For example, to indent a check box relative to a label use this constant to <code>getPreferredGap</code>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.sun.lwuit.layouts.LayoutStyle.INDENT">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="LayoutStyle()"><!-- --></A><H3>
LayoutStyle</H3>
<PRE>
public <B>LayoutStyle</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setSharedInstance(com.sun.lwuit.layouts.LayoutStyle)"><!-- --></A><H3>
setSharedInstance</H3>
<PRE>
public static void <B>setSharedInstance</B>(<A HREF="../../../../com/sun/lwuit/layouts/LayoutStyle.html" title="class in com.sun.lwuit.layouts">LayoutStyle</A> layout)</PRE>
<DL>
<DD>Sets the LayoutStyle instance to use for this look and feel. You generally don't need to invoke this, instead use the getter which will return the LayoutStyle appropriate for the current look and feel.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>layout</CODE> - the LayoutStyle to use; a value of null indicates the default should be used</DL>
</DD>
</DL>
<HR>
<A NAME="getSharedInstance()"><!-- --></A><H3>
getSharedInstance</H3>
<PRE>
public static <A HREF="../../../../com/sun/lwuit/layouts/LayoutStyle.html" title="class in com.sun.lwuit.layouts">LayoutStyle</A> <B>getSharedInstance</B>()</PRE>
<DL>
<DD>Factory methods for obtaining the current <code>LayoutStyle</code> object appropriate for the current look and feel.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current LayoutStyle instance</DL>
</DD>
</DL>
<HR>
<A NAME="getPreferredGap(com.sun.lwuit.Component, com.sun.lwuit.Component, int, int, com.sun.lwuit.Container)"><!-- --></A><H3>
getPreferredGap</H3>
<PRE>
public int <B>getPreferredGap</B>(<A HREF="../../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A> component1,
<A HREF="../../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A> component2,
int type,
int position,
<A HREF="../../../../com/sun/lwuit/Container.html" title="class in com.sun.lwuit">Container</A> parent)</PRE>
<DL>
<DD>Returns the amount of space to use between two components. The return value indicates the distance to place <code>component2</code> relative to <code>component1</code>. For example, the following returns the amount of space to place between <code>component2</code> and <code>component1</code> when <code>component2</code> is placed vertically above <code>component1</code>: <pre> int gap = getPreferredGap(component1, component2, LayoutStyle.RELATED, SwingConstants.NORTH, parent); </pre> The <code>type</code> parameter indicates the type of gap being requested. It can be one of the following values: <table> <tr><td><code>RELATED</code> <td>If the two components will be contained in the same parent and are showing similar logically related items, use <code>RELATED</code>. <tr><td><code>UNRELATED</code> <td>If the two components will be contained in the same parent but show logically unrelated items use <code>UNRELATED</code>. <tr><td><code>INDENT</code> <td>Used to obtain the preferred distance to indent a component relative to another. For example, if you want to horizontally indent a JCheckBox relative to a JLabel use <code>INDENT</code>. This is only useful for the horizontal axis. </table> <p> It's important to note that some look and feels may not distinguish between <code>RELATED</code> and <code>UNRELATED</code>. <p> The return value is not intended to take into account the current size and position of <code>component2</code> or <code>component1</code>. The return value may take into consideration various properties of the components. For example, the space may vary based on font size, or the preferred size of the component.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>component1</CODE> - the <code>JComponent</code> <code>component2</code> is being placed relative to<DD><CODE>component2</CODE> - the <code>JComponent</code> being placed<DD><CODE>type</CODE> - how the two components are being placed<DD><CODE>position</CODE> - the position <code>component2</code> is being placed relative to <code>component1</code>; one of <code>SwingConstants.NORTH</code>, <code>SwingConstants.SOUTH</code>, <code>SwingConstants.EAST</code> or <code>SwingConstants.WEST</code><DD><CODE>parent</CODE> - the parent of <code>component2</code>; this may differ from the actual parent and may be null
<DT><B>Returns:</B><DD>the amount of space to place between the two components
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>position</code> is not one of <code>SwingConstants.NORTH</code>, <code>SwingConstants.SOUTH</code>, <code>SwingConstants.EAST</code> or <code>SwingConstants.WEST</code>; <code>type</code> not one of <code>INDENT</code>, <code>RELATED</code> or <code>UNRELATED</code>; or <code>component1</code> or <code>component2</code> is null</DL>
</DD>
</DL>
<HR>
<A NAME="getContainerGap(com.sun.lwuit.Component, int, com.sun.lwuit.Container)"><!-- --></A><H3>
getContainerGap</H3>
<PRE>
public int <B>getContainerGap</B>(<A HREF="../../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A> component,
int position,
<A HREF="../../../../com/sun/lwuit/Container.html" title="class in com.sun.lwuit">Container</A> parent)</PRE>
<DL>
<DD>Returns the amount of space to position a component inside its parent.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>component</CODE> - the <code>Component</code> being positioned<DD><CODE>position</CODE> - the position <code>component</code> is being placed relative to its parent; one of <code>SwingConstants.NORTH</code>, <code>SwingConstants.SOUTH</code>, <code>SwingConstants.EAST</code> or <code>SwingConstants.WEST</code><DD><CODE>parent</CODE> - the parent of <code>component</code>; this may differ from the actual parent and may be null
<DT><B>Returns:</B><DD>the amount of space to place between the component and specified edge
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>position</code> is not one of <code>SwingConstants.NORTH</code>, <code>SwingConstants.SOUTH</code>, <code>SwingConstants.EAST</code> or <code>SwingConstants.WEST</code>; or <code>component</code> is null</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LayoutStyle.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/sun/lwuit/layouts/Layout.html" title="class in com.sun.lwuit.layouts"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/sun/lwuit/layouts/LayoutStyle.html" target="_top"><B>FRAMES</B></A>
<A HREF="LayoutStyle.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -