javax.swing.plaf.basic
クラス BasicProgressBarUI
java.lang.Object
|
+--javax.swing.plaf.ComponentUI
|
+--javax.swing.plaf.ProgressBarUI
|
+--javax.swing.plaf.basic.BasicProgressBarUI
- 直接の既知のサブクラス:
- MetalProgressBarUI
- public class BasicProgressBarUI
- extends ProgressBarUI
ProgressBarUI の Basic 仕様 Look & Feel による実装です。
メソッドの概要 |
static ComponentUI |
createUI(JComponent x)
|
protected int |
getAmountFull(Insets b,
int width,
int height)
モデルから集めた完了パーセント情報に基づいて、塗りつぶされる進捗バーの量を決定します。 |
protected int |
getCellLength()
進捗バーに描画される個々のセルおよび単位の幅 (HORIZONTAL の場合) または高さ (VERTICAL の場合) を返します。 |
protected int |
getCellSpacing()
進捗バーにある各セルおよび単位の間隔を返します。 |
Dimension |
getMaximumSize(JComponent c)
|
Dimension |
getMinimumSize(JComponent c)
このコンポーネントでの最小サイズは 10 です。 |
protected Dimension |
getPreferredInnerHorizontal()
|
protected Dimension |
getPreferredInnerVertical()
|
Dimension |
getPreferredSize(JComponent c)
|
protected Color |
getSelectionBackground()
selectionBackground は、進捗バーの塗りつぶされていない領域に描画するときのテキストの色です。 |
protected Color |
getSelectionForeground()
selectionForeground は、進捗バーの塗りつぶされた領域に描画するときのテキストの色です。 |
protected Point |
getStringPlacement(Graphics g,
String progressString,
int x,
int y,
int width,
int height)
進捗文字列の描画位置を指定します。 |
protected void |
installDefaults()
|
protected void |
installListeners()
|
void |
installUI(JComponent c)
|
void |
paint(Graphics g,
JComponent c)
ほぼすべての直線進捗バーで正しく動作する、汎用の paint メソッドです。 |
protected void |
paintString(Graphics g,
int x,
int y,
int width,
int height,
int amountFull,
Insets b)
|
protected void |
setCellLength(int cellLen)
|
protected void |
setCellSpacing(int cellSpace)
|
protected void |
uninstallDefaults()
|
protected void |
uninstallListeners()
|
void |
uninstallUI(JComponent c)
|
クラス java.lang.Object から継承したメソッド |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
progressBar
protected JProgressBar progressBar
changeListener
protected ChangeListener changeListener
BasicProgressBarUI
public BasicProgressBarUI()
createUI
public static ComponentUI createUI(JComponent x)
installUI
public void installUI(JComponent c)
- オーバーライド:
- クラス ComponentUI 内の installUI
uninstallUI
public void uninstallUI(JComponent c)
- オーバーライド:
- クラス ComponentUI 内の uninstallUI
installDefaults
protected void installDefaults()
uninstallDefaults
protected void uninstallDefaults()
installListeners
protected void installListeners()
uninstallListeners
protected void uninstallListeners()
getPreferredInnerHorizontal
protected Dimension getPreferredInnerHorizontal()
getPreferredInnerVertical
protected Dimension getPreferredInnerVertical()
getSelectionForeground
protected Color getSelectionForeground()
- selectionForeground は、進捗バーの塗りつぶされた領域に描画するときのテキストの色です。
getSelectionBackground
protected Color getSelectionBackground()
- selectionBackground は、進捗バーの塗りつぶされていない領域に描画するときのテキストの色です。
getCellLength
protected int getCellLength()
- 進捗バーに描画される個々のセルおよび単位の幅 (HORIZONTAL の場合) または高さ (VERTICAL の場合) を返します。ただし、テキストのレンダリングの簡略化、および表示上の美しさの観点から、進捗文字列が描画されている間は、この関数は 1 を返します。
- 戻り値:
- セルの間隔を表す値
- 関連項目:
setCellLength
,
JProgressBar.isStringPainted
setCellLength
protected void setCellLength(int cellLen)
getCellSpacing
protected int getCellSpacing()
- 進捗バーにある各セルおよび単位の間隔を返します。ただし、テキストのレンダリングの簡略化、および表示上の美しさの観点から、進捗文字列が描画されている間は、この関数は 0 を返します。
- 戻り値:
- セルの間隔を表す値
- 関連項目:
setCellSpacing
,
JProgressBar.isStringPainted
setCellSpacing
protected void setCellSpacing(int cellSpace)
getAmountFull
protected int getAmountFull(Insets b,
int width,
int height)
- モデルから集めた完了パーセント情報に基づいて、塗りつぶされる進捗バーの量を決定します。これは共用のオペレーションなので、抽象化されています。ここでは、使用する進捗バーが直線であると想定しています。すなわち、円形の進捗インジケータを作成する場合は、このメソッドをオーバーライドすることができます。
paint
public void paint(Graphics g,
JComponent c)
- ほぼすべての直線進捗バーで正しく動作する、汎用の paint メソッドです。デフォルトのテーブルに値を設定するだけで、進捗バーのペイントが問題なく動作するようになります。円形、あるいは半円形の進捗バーを作成する場合には、このメソッドをオーバーライドしてください。
- オーバーライド:
- クラス ComponentUI 内の paint
paintString
protected void paintString(Graphics g,
int x,
int y,
int width,
int height,
int amountFull,
Insets b)
getStringPlacement
protected Point getStringPlacement(Graphics g,
String progressString,
int x,
int y,
int width,
int height)
- 進捗文字列の描画位置を指定します。この実装では、進捗バーの中央 (x および y の両方) に文字列を配置します。進捗文字列を右、左、上、あるいは下に配置したい場合、あるいはなんらかの理由で削除したい場合は、このメソッドをオーバーライドしてください。
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- オーバーライド:
- クラス ComponentUI 内の getPreferredSize
getMinimumSize
public Dimension getMinimumSize(JComponent c)
- このコンポーネントでの最小サイズは 10 です。10 パーセントに対して 1 ピクセル以上を対応させるようにする必要があります。
- オーバーライド:
- クラス ComponentUI 内の getMinimumSize
getMaximumSize
public Dimension getMaximumSize(JComponent c)
- オーバーライド:
- クラス ComponentUI 内の getMaximumSize
バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.