|
||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||
java.lang.Objectjp.hishidama.swing.util.ComponentUtil
public class ComponentUtil
Componentユーティリティー.
→使用例
| コンストラクタの概要 | |
|---|---|
ComponentUtil()
|
|
| メソッドの概要 | |
|---|---|
static Dimension |
calcComponentSizeFromText(JComponent comp)
コンポーネントサイズ計算. |
static Dimension |
calcComponentSizeFromText(JComponent comp,
String text)
コンポーネントサイズ計算. |
static Dimension |
getStringSize(Component comp,
String text)
文字列サイズ取得. |
static void |
resizeComponentFromText(JComponent comp)
コンポーネントサイズ変更. |
| クラス java.lang.Object から継承されたメソッド |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public ComponentUtil()
| メソッドの詳細 |
|---|
public static void resizeComponentFromText(JComponent comp)
コンポーネント内に格納されている文字列(getText()で取得)を内包できる大きさになるよう コンポーネントのサイズを変更する。
comp - コンポーネントcalcComponentSizeFromText(JComponent)public static Dimension calcComponentSizeFromText(JComponent comp)
コンポーネント内に格納されている文字列(getText()で取得)を内包できるコンポーネントの大きさを返す。
comp - コンポーネント
RuntimeException - getText()が存在しない場合等calcComponentSizeFromText(JComponent, String)
public static Dimension calcComponentSizeFromText(JComponent comp,
String text)
文字列を内包できるコンポーネントの大きさを返す。
comp - コンポーネントtext - 文字列
getStringSize(Component, String)
public static Dimension getStringSize(Component comp,
String text)
コンポーネント内のフォントを使用した 文字列のサイズを返す。
comp - コンポーネントtext - 文字列
|
||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||