public class BasicProgressBarUI extends ProgressBarUI
| 修食åãšå | ã¯ã©ã¹ | 説æ |
|---|---|---|
class |
BasicProgressBarUI.ChangeHandler |
ãã®ã¯ã©ã¹ã¯ããprotectedãå
éšã¯ã©ã¹ãšããŠæ±ãããã«ããŠãã ããã
|
| 修食åãšå | ãã£ãŒã«ã | 説æ |
|---|---|---|
protected Rectangle |
boxRect |
ãã€ã³ãããã(getBoxã«ãã£ãŠè¿ããã)ããŠã³ã·ã³ã°ã»ããã¯ã¹ã®äœçœ®ãšãµã€ãºãä¿æããããã«äœ¿çšããŸãã
|
protected ChangeListener |
changeListener |
|
protected JProgressBar |
progressBar |
| ã³ã³ã¹ãã©ã¯ã¿ | 説æ |
|---|---|
BasicProgressBarUI() |
| 修食åãšå | ã¡ãœãã | 説æ |
|---|---|---|
static ComponentUI |
createUI(JComponent x) |
|
protected int |
getAmountFull(Insets b, int width, int height) |
ã¢ãã«ããéããå®äºããŒã»ã³ãæ
å ±ã«åºã¥ããŠãå¡ãã€ã¶ãã¹ã鲿ããŒã®éãæ±ºå®ããŸãã
|
protected int |
getAnimationIndex() |
çŸåšã®ã¢ãã¡ãŒã·ã§ã³ã»ãã¬ãŒã ã®ã€ã³ããã¯ã¹ãååŸããŸãã
|
int |
getBaseline(JComponent c, int width, int height) |
ããŒã¹ã©ã€ã³ãè¿ããŸãã
|
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(JComponent c) |
ãµã€ãºã®å€åã«åãããŠã³ã³ããŒãã³ãã®ããŒã¹ã©ã€ã³ãã©ã®ããã«å€åãããã瀺ãåæãè¿ããŸãã
|
protected Rectangle |
getBox(Rectangle r) |
çŸåšã®ã¢ãã¡ãŒã·ã§ã³ã»ã€ã³ããã¯ã¹çšã«ãã€ã³ããããããŠã³ã·ã³ã°ã»ããã¯ã¹ã®äœçœ®ãšãµã€ãºã
rã«æ ŒçŽããrãè¿ããŸãã |
protected int |
getBoxLength(int availableLength, int otherDimension) |
ãã€ã³ãããããããŠã³ã·ã³ã°ã»ããã¯ã¹ãã®é·ããè¿ããŸãã
|
protected int |
getCellLength() |
鲿ããŒã«ã¬ã³ããªã³ã°ãããåã
ã®ã»ã«ããã³åäœã®å¹
(HORIZONTALã®å Žå)ãŸãã¯é«ã(VERTICALã®å Žå)ãè¿ããŸãã
|
protected int |
getCellSpacing() |
鲿ããŒã«ããåã»ã«ããã³åäœã®ééãè¿ããŸãã
|
protected int |
getFrameCount() |
äžç¢ºå®ã¢ãŒãã®JProgressBarã§äœ¿çšãããå®å
šãªã¢ãã¡ãŒã·ã§ã³ã»ã«ãŒãã®ããã®ãã¬ãŒã æ°ãè¿ããŸãã
|
Dimension |
getMaximumSize(JComponent c) |
æå®ãããã³ã³ããŒãã³ãã®ãLook & Feelã«é©ããæå€§ãµã€ãºãè¿ããŸãã
|
Dimension |
getMinimumSize(JComponent c) |
ãã®ã³ã³ããŒãã³ãã®æå°ãµã€ãºã¯10ã§ãã
|
protected Dimension |
getPreferredInnerHorizontal() |
|
protected Dimension |
getPreferredInnerVertical() |
|
Dimension |
getPreferredSize(JComponent c) |
æå®ãããã³ã³ããŒãã³ãã®ãLook & Feelã«é©ããæšå¥šãµã€ãºãè¿ããŸãã
|
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 |
incrementAnimationIndex() |
çŸåšã®ã¢ãã¡ãŒã·ã§ã³ã»ãã¬ãŒã ã®ã€ã³ããã¯ã¹ãæ¬¡ã®æå¹å€ã«èšå®ããŸã(鲿ããŒãåãã€ã³ããããŸã)ã
|
protected void |
installDefaults() |
|
protected void |
installListeners() |
|
void |
installUI(JComponent c) |
æå®ãããã³ã³ããŒãã³ããLook & Feelã«å¿ããŠé©åã«æ§æããŸãã
|
void |
paint(Graphics g, JComponent c) |
ãã€ã³ãã2ã€ã®ã¡ãœããpaintDeterminateãŸãã¯paintIndeterminateã®ã©ã¡ããã«å§è²ããŸãã
|
protected void |
paintDeterminate(Graphics g, JComponent c) |
ã»ãŒãã¹ãŠã®ç¢ºå®ã¢ãŒãã®ãªãã¢ãªé²æããŒã§æ£ããåäœãããæ±çšã®paintã¡ãœããã§ãã
|
protected void |
paintIndeterminate(Graphics g, JComponent c) |
ãã¹ãŠã®ãªãã¢ãªããŠã³ã·ã³ã°ã»ããã¯ã¹é²æããŒã§æ£ããåäœãããæ±çšã®paintã¡ãœããã§ãã
|
protected void |
paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) |
|
protected void |
setAnimationIndex(int newValue) |
çŸåšã®ã¢ãã¡ãŒã·ã§ã³ã»ãã¬ãŒã ã®ã€ã³ããã¯ã¹ãæå®ãããå€ã«èšå®ãã鲿ããŒããã€ã³ããçŽãããèŠæ±ããŸãã
|
protected void |
setCellLength(int cellLen) |
|
protected void |
setCellSpacing(int cellSpace) |
|
protected void |
startAnimationTimer() |
ã¢ãã¡ãŒã·ã§ã³ã»ã¹ã¬ãããèµ·åããŸã(å¿
èŠã«å¿ããŠäœæããŠåæåããŸã)ã
|
protected void |
stopAnimationTimer() |
ã¢ãã¡ãŒã·ã§ã³ã»ã¹ã¬ããã忢ããŸãã
|
protected void |
uninstallDefaults() |
|
protected void |
uninstallListeners() |
ãã®ãªããžã§ã¯ããã€ã³ã¹ããŒã«ãããã¹ãŠã®ãªã¹ããŒãåé€ããŸãã
|
void |
uninstallUI(JComponent c) |
installUIæã«ãæå®ãããã³ã³ããŒãã³ãã«å¯ŸããŠè¡ãããæ§æãåãæ¶ããŸãã |
contains, getAccessibleChild, getAccessibleChildrenCount, updateprotected JProgressBar progressBar
protected ChangeListener changeListener
protected Rectangle boxRect
public static ComponentUI createUI(JComponent x)
public void installUI(JComponent c)
ComponentUIComponentUIã€ã³ã¹ã¿ã³ã¹ããæå®ãããã³ã³ããŒãã³ãã®UIå§è²ãšããŠã€ã³ã¹ããŒã«ãããŠãããšãã«åŒã³åºãããŸãã ãã®ã¡ãœããã¯ã次ãå«ãLook & Feelçšã®ã³ã³ããŒãã³ããå®å
šã«æ§æããã¹ãã§ãã
LayoutManagerãã€ã³ã¹ããŒã«ããã
PropertyChangeListenerãäœæããŠã³ã³ããŒãã³ãã«ã€ã³ã¹ããŒã«ããã
installUIãã¯ã©ã¹ComponentUIc - UIå§è²ãã€ã³ã¹ããŒã«ãããã³ã³ããŒãã³ãComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()public void uninstallUI(JComponent c)
ComponentUIinstallUIæã«ãæå®ãããã³ã³ããŒãã³ãã«å¯ŸããŠè¡ãããæ§æãåãæ¶ããŸãã ãã®ã¡ãœããã¯ããã®UIComponentã€ã³ã¹ã¿ã³ã¹ããæå®ãããã³ã³ããŒãã³ãã®UIå§è²ãšããŠåé€ãããŠãããšãã«åŒã³åºãããŸãã ãã®ã¡ãœããã¯ãinstallUIã«ãã£ãŠå®è¡ãããæ§æãå
ã«æ»ãã¹ãã§ãããã®å ŽåãJComponentã€ã³ã¹ã¿ã³ã¹ãã¯ãªãŒã³ãªç¶æ
(äœåãªãªã¹ããŒããLook & Feelåºæã®ããããã£ã»ãªããžã§ã¯ããæ®ããªãããã«)ã«ããããååæ³šæããŠãã ããã æé ã«ã¯æ¬¡ã®ãã®ãå«ãŸããã¹ãã§ãã
uninstallUIãã¯ã©ã¹ComponentUIc - ãã®UIå§è²ãåé€ãããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()protected void installDefaults()
protected void uninstallDefaults()
protected void installListeners()
protected void startAnimationTimer()
stopAnimationTimer()protected void stopAnimationTimer()
startAnimationTimer()protected void uninstallListeners()
public int getBaseline(JComponent c, int width, int height)
getBaselineãã¯ã©ã¹ComponentUIc - ããŒã¹ã©ã€ã³ãèŠæ±ãããJComponentwidth - ããŒã¹ã©ã€ã³ãååŸããå¹
height - ããŒã¹ã©ã€ã³ãååŸããé«ãNullPointerException - cãnullã§ããå ŽåIllegalArgumentException - å¹
ãŸãã¯é«ãã0ããå°ããå ŽåJComponent.getBaseline(int, int)public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
getBaselineResizeBehaviorãã¯ã©ã¹ComponentUIc - ããŒã¹ã©ã€ã³ã®ãµã€ãºå€æŽã®åäœãè¿ãJComponentNullPointerException - cãnullã§ããå ŽåJComponent.getBaseline(int, int)protected Dimension getPreferredInnerHorizontal()
protected Dimension getPreferredInnerVertical()
protected Color getSelectionForeground()
protected Color getSelectionBackground()
protected int getCellLength()
setCellLength(int), JProgressBar.isStringPainted()protected void setCellLength(int cellLen)
protected int getCellSpacing()
setCellSpacing(int), JProgressBar.isStringPainted()protected void setCellSpacing(int cellSpace)
protected int getAmountFull(Insets b, int width, int height)
public void paint(Graphics g, JComponent c)
paintãã¯ã©ã¹ComponentUIg - ãã€ã³ã察象ã®Graphicsã³ã³ããã¹ãc - ãã€ã³ããããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããComponentUI.update(java.awt.Graphics, javax.swing.JComponent)protected Rectangle getBox(Rectangle r)
rã«æ ŒçŽããrãè¿ããŸãã paintIndeterminateã®ãã®ã¯ã©ã¹ã®å®è£
ã§å®è¡ããããã€ã³ãã«è¿œå ãããµãã¯ã©ã¹ã¯ - ããšãã°ãããŠã³ã·ã³ã°ã»ããã¯ã¹ã®åšãã«ã¢ãŠãã©ã€ã³ãæç»ããããã« - ãã®ã¡ãœããã䜿çšããŠãã€ã³ããããã°ããã®ããŠã³ã·ã³ã°ã»ããã¯ã¹ã®äœçœ®ãååŸã§ããŸãã ãã®ã¡ãœããããªãŒããŒã©ã€ãããããšã«ãããpaintIndeterminateãå®è£
ãçŽããªããŠããããŠã³ã·ã³ã°ã»ããã¯ã¹ã®ãµã€ãºãšäœçœ®ãå®å
šã«å¶åŸ¡ã§ããŸãã r - 倿ŽãããRectangleã®ã€ã³ã¹ã¿ã³ã¹ãnullãå¯nullãããã§ãªãå Žåã¯æž¡ãããç©åœ¢(null以å€ã®å Žå)ããŸãã¯æ°ããç©åœ¢setAnimationIndex(int)protected int getBoxLength(int availableLength,
int otherDimension)
paintIndeterminateã®ããã©ã«ãå®è£
ã«ãã£ãŠåŒã³åºãããŸãã ããšãã°:
boxRect.width = getBoxLength(componentInnards.width,
componentInnards.height);
availableLength - å
¥ã£ãŠããããŠã³ã·ã³ã°ã»ããã¯ã¹ã«å©çšã§ããã¹ããŒã¹ã®éãããšãã°ãæ°Žå¹³æ¹åã®é²æããŒã§ã¯ã鲿ããŒã®å
éšã®å¹
(ã³ã³ããŒãã³ãå¹
ããããŒããŒãåŒããå€)otherDimension - æ°Žå¹³æ¹åã®é²æããŒã§ã¯ã鲿ããŒã®å
éšã®é«ãããã®å€ã¯ãæ»ãå€ãå¶éãŸãã¯æ±ºå®ããããã«äœ¿çšã§ããavailableLength以äžã§ããå¿
èŠãããSwingUtilities.calculateInnerArea(javax.swing.JComponent, java.awt.Rectangle)protected void paintIndeterminate(Graphics g, JComponent c)
paintDeterminate(java.awt.Graphics, javax.swing.JComponent)protected void paintDeterminate(Graphics g, JComponent c)
paintIndeterminate(java.awt.Graphics, javax.swing.JComponent)protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
protected Point getStringPlacement(Graphics g, String progressString, int x, int y, int width, int height)
public Dimension getPreferredSize(JComponent c)
ComponentUInullãè¿ãããå Žåãé©åãªãµã€ãºã¯ä»£ããã«ã³ã³ããŒãã³ãã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ã«ãã£ãŠèšç®ãããŸã(ããã¯ãç¹å®ã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ãã€ã³ã¹ããŒã«ããŠããã³ã³ããŒãã³ãã®å Žåã«æšå¥šããæ¹æ³ã§ã)ã ãã®ã¡ãœããã®ããã©ã«ãå®è£
ã¯nullãè¿ããŸãã getPreferredSizeãã¯ã©ã¹ComponentUIc - æšå¥šãµã€ãºãç
§äŒãããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããJComponent.getPreferredSize(), LayoutManager.preferredLayoutSize(java.awt.Container)public Dimension getMinimumSize(JComponent c)
getMinimumSizeãã¯ã©ã¹ComponentUIc - æå°ãµã€ãºãç
§äŒãããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããDimensionãªããžã§ã¯ããŸãã¯nullJComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent)public Dimension getMaximumSize(JComponent c)
ComponentUInullãè¿ãããå Žåãæå€§ãµã€ãºã¯ä»£ããã«ã³ã³ããŒãã³ãã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ã«ãã£ãŠèšç®ãããŸã(ããã¯ãç¹å®ã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ãã€ã³ã¹ããŒã«ããŠããã³ã³ããŒãã³ãã®å Žåã«æšå¥šããæ¹æ³ã§ã)ã ãã®ã¡ãœããã®ããã©ã«ãå®è£
ã¯getPreferredSizeãåŒã³åºããŠããã®å€ãè¿ããŸãã getMaximumSizeãã¯ã©ã¹ComponentUIc - æå€§ãµã€ãºãç
§äŒãããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããDimensionãªããžã§ã¯ããŸãã¯nullJComponent.getMaximumSize(), LayoutManager2.maximumLayoutSize(java.awt.Container)protected int getAnimationIndex()
protected final int getFrameCount()
protected void setAnimationIndex(int newValue)
repaintã¡ãœããã®èµ·åæ¹æ³ã倿Žããå¿
èŠãããå ŽåããããŸãã newValue - æ°ããã¢ãã¡ãŒã·ã§ã³ã»ã€ã³ããã¯ã¹ããã®å€ã¯ãã§ãã¯ãããªãincrementAnimationIndex()protected void incrementAnimationIndex()
setAnimationIndex(int) ãã°ãŸãã¯æ©èœãéä¿¡
詳现ãªAPIãªãã¡ã¬ã³ã¹ããã³éçºè
ããã¥ã¡ã³ãã«ã€ããŠã¯ãJava SEã®ããã¥ã¡ã³ããåç
§ããŠãã ããã ãã®ããã¥ã¡ã³ãã«ã¯ãæŠå¿µçãªæŠèŠãçšèªã®å®çŸ©ãåé¿æ¹æ³ãæå¹ãªã³ãŒãäŸãªã©ã®ãéçºè
ã察象ã«ãããã詳现ãªèª¬æãå«ãŸããŠããŸãã
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyãåç
§ããŠãã ããã