|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.SliderUI
javax.swing.plaf.basic.BasicSliderUI
public class BasicSliderUI
SliderUI 의 기본 Look & Feel 에 의한 구현입니다.
상자의 클래스의 개요 | |
---|---|
class |
BasicSliderUI.ActionScroller
문서로부터 삭제된 이 클래스는, Java 2 플랫폼 1.3 에서는 사용하지 않습니다. |
class |
BasicSliderUI.ChangeHandler
데이터 모델의 청취자입니다. |
class |
BasicSliderUI.ComponentHandler
사이즈 변경 이벤트의 청취자입니다. |
class |
BasicSliderUI.FocusHandler
포커스 변경의 청취자입니다. |
class |
BasicSliderUI.PropertyChangeHandler
|
class |
BasicSliderUI.ScrollListener
스크롤 이벤트 청취자입니다. |
class |
BasicSliderUI.TrackListener
마우스의 움직임을 추적합니다. |
필드의 개요 | |
---|---|
protected ChangeListener |
changeListener
|
protected ComponentListener |
componentListener
|
protected Rectangle |
contentRect
|
protected Insets |
focusInsets
|
protected FocusListener |
focusListener
|
protected Rectangle |
focusRect
|
protected Insets |
insetCache
|
protected Rectangle |
labelRect
|
protected boolean |
leftToRightCache
|
static int |
MAX_SCROLL
|
static int |
MIN_SCROLL
|
static int |
NEGATIVE_SCROLL
|
static int |
POSITIVE_SCROLL
|
protected PropertyChangeListener |
propertyChangeListener
|
protected BasicSliderUI.ScrollListener |
scrollListener
|
protected Timer |
scrollTimer
|
protected JSlider |
slider
|
protected Rectangle |
thumbRect
|
protected Rectangle |
tickRect
|
protected int |
trackBuffer
|
protected BasicSliderUI.TrackListener |
trackListener
|
protected Rectangle |
trackRect
|
생성자 의 개요 | |
---|---|
BasicSliderUI (JSlider b)
|
메소드의 개요 | |
---|---|
protected void |
calculateContentRect ()
|
protected void |
calculateFocusRect ()
|
protected void |
calculateGeometry ()
|
protected void |
calculateLabelRect ()
|
protected void |
calculateThumbLocation ()
|
protected void |
calculateThumbSize ()
|
protected void |
calculateTickRect ()
|
protected void |
calculateTrackBuffer ()
|
protected void |
calculateTrackRect ()
|
protected ChangeListener |
createChangeListener (JSlider slider)
|
protected ComponentListener |
createComponentListener (JSlider slider)
|
protected FocusListener |
createFocusListener (JSlider slider)
|
protected PropertyChangeListener |
createPropertyChangeListener (JSlider slider)
|
protected BasicSliderUI.ScrollListener |
createScrollListener (JSlider slider)
|
protected BasicSliderUI.TrackListener |
createTrackListener (JSlider slider)
|
static ComponentUI |
createUI (JComponent b)
|
protected boolean |
drawInverted ()
|
int |
getBaseline (JComponent c,
int width,
int height)
baseline를 돌려줍니다. |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior (JComponent c)
사이즈의 변화에 맞추어 컴퍼넌트의 baseline가 어떻게 변화하는지를 나타내는 열거를 돌려줍니다. |
protected Color |
getFocusColor ()
|
protected int |
getHeightOfHighValueLabel ()
|
protected int |
getHeightOfLowValueLabel ()
|
protected int |
getHeightOfTallestLabel ()
|
protected Integer |
getHighestValue ()
라벨 테이블에 엔트리를 가지는 최대의 값을 돌려줍니다. |
protected Component |
getHighestValueLabel ()
라벨 테이블의 최소의 슬라이더치에 대응하는 라벨을 돌려줍니다. |
protected Color |
getHighlightColor ()
|
protected Integer |
getLowestValue ()
라벨 테이블에 엔트리를 가지는 최소의 값을 돌려줍니다. |
protected Component |
getLowestValueLabel ()
라벨 테이블의 최대의 슬라이더치에 대응하는 라벨을 돌려줍니다. |
Dimension |
getMaximumSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 최대 사이즈를 돌려줍니다. |
Dimension |
getMinimumHorizontalSize ()
|
Dimension |
getMinimumSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 최소 사이즈를 돌려줍니다. |
Dimension |
getMinimumVerticalSize ()
|
Dimension |
getPreferredHorizontalSize ()
|
Dimension |
getPreferredSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 적절한 사이즈를 돌려줍니다. |
Dimension |
getPreferredVerticalSize ()
|
protected Color |
getShadowColor ()
|
protected Dimension |
getThumbSize ()
|
protected int |
getTickLength ()
수평 슬라이더의 눈금 영역의 높이 및 수직 슬라이더의 눈금 영역의 폭을 돌려줍니다. |
protected int |
getWidthOfHighValueLabel ()
|
protected int |
getWidthOfLowValueLabel ()
|
protected int |
getWidthOfWidestLabel ()
|
protected void |
installDefaults (JSlider slider)
|
protected void |
installKeyboardActions (JSlider slider)
|
protected void |
installListeners (JSlider slider)
|
void |
installUI (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트를 구성합니다. |
protected boolean |
isDragging ()
사용자가 슬라이더를 드래그 하고 있는 경우는 true 를 돌려줍니다. |
protected boolean |
labelsHaveSameBaselines ()
라벨 테이블의 모든 라벨의 baseline가 같은 경우에 true 를 돌려줍니다. |
void |
paint (Graphics g,
JComponent c)
Look &Feel 에 적절한, 지정된 컴퍼넌트를 그립니다. |
void |
paintFocus (Graphics g)
|
protected void |
paintHorizontalLabel (Graphics g,
int value,
Component label)
라벨 테이블의 각 라벨에 대해서 불려 갑니다. |
void |
paintLabels (Graphics g)
|
protected void |
paintMajorTickForHorizSlider (Graphics g,
Rectangle tickBounds,
int x)
|
protected void |
paintMajorTickForVertSlider (Graphics g,
Rectangle tickBounds,
int y)
|
protected void |
paintMinorTickForHorizSlider (Graphics g,
Rectangle tickBounds,
int x)
|
protected void |
paintMinorTickForVertSlider (Graphics g,
Rectangle tickBounds,
int y)
|
void |
paintThumb (Graphics g)
|
void |
paintTicks (Graphics g)
|
void |
paintTrack (Graphics g)
|
protected void |
paintVerticalLabel (Graphics g,
int value,
Component label)
라벨 테이블의 각 라벨에 대해서 불려 갑니다. |
protected void |
recalculateIfInsetsChanged ()
|
protected void |
recalculateIfOrientationChanged ()
|
void |
scrollByBlock (int direction)
|
void |
scrollByUnit (int direction)
|
protected void |
scrollDueToClickInTrack (int dir)
샘은 아니고 트럭으로 mousePressed 가 검출되었을 때에 불려 갑니다. |
void |
setThumbLocation (int x,
int y)
|
protected void |
uninstallKeyboardActions (JSlider slider)
|
protected void |
uninstallListeners (JSlider slider)
|
void |
uninstallUI (JComponent c)
installUI 시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. |
int |
valueForXPosition (int xPos)
x 위치를 나타내는 값을 돌려줍니다. |
int |
valueForYPosition (int yPos)
y 위치를 나타내는 값을 돌려줍니다. |
protected int |
xPositionForValue (int value)
|
protected int |
yPositionForValue (int value)
|
protected int |
yPositionForValue (int value,
int trackY,
int trackHeight)
지정된 값의 y 의 위치를 돌려줍니다. |
클래스 javax.swing.plaf. ComponentUI 로부터 상속된 메소드 |
---|
contains , getAccessibleChild , getAccessibleChildrenCount , update |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
---|
public static final int POSITIVE_SCROLL
public static final int NEGATIVE_SCROLL
public static final int MIN_SCROLL
public static final int MAX_SCROLL
protected Timer scrollTimer
protected JSlider slider
protected Insets focusInsets
protected Insets insetCache
protected boolean leftToRightCache
protected Rectangle focusRect
protected Rectangle contentRect
protected Rectangle labelRect
protected Rectangle tickRect
protected Rectangle trackRect
protected Rectangle thumbRect
protected int trackBuffer
protected BasicSliderUI.TrackListener trackListener
protected ChangeListener changeListener
protected ComponentListener componentListener
protected FocusListener focusListener
protected BasicSliderUI.ScrollListener scrollListener
protected PropertyChangeListener propertyChangeListener
생성자 의 상세 |
---|
public BasicSliderUI(JSlider b)
메소드의 상세 |
---|
protected Color getShadowColor()
protected Color getHighlightColor()
protected Color getFocusColor()
protected boolean isDragging()
public static ComponentUI createUI(JComponent b)
public void installUI(JComponent c)
ComponentUI
의 기술:ComponentUI
인스턴스가, 지정된 컴퍼넌트의 UI 위양으로서 인스톨 되고 있을 때 불려 갑니다. 이 메소드는, 이하를 포함한 Look & Feel 용의 컴퍼넌트를 완전하게 구성할 필요가 있습니다.
LayoutManager
를 인스톨 한다
PropertyChangeListener
를 컴퍼넌트에 작성 또는 인스톨 한다
ComponentUI
내의 installUI
c
- UI 위양이 인스톨 되고 있는 컴퍼넌트ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
의 기술:installUI
시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. 이 메소드는, 지정된 컴퍼넌트의 UI 위양으로서의 UIComponent
인스턴스가 삭제되고 있을 때 불려 갑니다. 이 메소드는,installUI
에 의해 실행된 구성을 바탕으로 되돌릴 필요가 있습니다. 이 경우,JComponent
인스턴스를 깨끗한 상태 (여분의 청취자나, Look & Feel 고유의 프로퍼티 객체가 남지 않게)로 하도록(듯이) 충분히 주의해 주세요. 순서에는 다음의 것이 있습니다.
ComponentUI
내의 uninstallUI
c
- 이 UI 위양을 삭제하는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void installDefaults(JSlider slider)
protected BasicSliderUI.TrackListener createTrackListener(JSlider slider)
protected ChangeListener createChangeListener(JSlider slider)
protected ComponentListener createComponentListener(JSlider slider)
protected FocusListener createFocusListener(JSlider slider)
protected BasicSliderUI.ScrollListener createScrollListener(JSlider slider)
protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
protected void installListeners(JSlider slider)
protected void uninstallListeners(JSlider slider)
protected void installKeyboardActions(JSlider slider)
protected void uninstallKeyboardActions(JSlider slider)
public int getBaseline(JComponent c, int width, int height)
ComponentUI
내의 getBaseline
c
- 요구되는 JComponent
baselinewidth
- baseline를 취득하는 폭height
- baseline를 취득하는 높이
NullPointerException
- c
가 null
의 경우
IllegalArgumentException
- 폭 또는 높이가 0 보다 작은 경우JComponent.getBaseline(int, int)
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
ComponentUI
내의 getBaselineResizeBehavior
c
- baseline의 사이즈 변경의 동작을 돌려주는 JComponent
NullPointerException
- c
가 null
의 경우JComponent.getBaseline(int, int)
protected boolean labelsHaveSameBaselines()
public Dimension getPreferredHorizontalSize()
public Dimension getPreferredVerticalSize()
public Dimension getMinimumHorizontalSize()
public Dimension getMinimumVerticalSize()
public Dimension getPreferredSize(JComponent c)
ComponentUI
의 기술:null
가 반환되는 경우, 적절한 사이즈는 대신에 컴퍼넌트의 레이아웃 매니저에 의해 계산됩니다 (이것은, 특정의 레이아웃 매니저를 인스톨 되어 있는 컴퍼넌트의 경우에 추천 하는 방법입니다). 이 메소드의 디폴트 구현은 null
를 돌려줍니다.
ComponentUI
내의 getPreferredSize
c
- 적절한 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent c)
ComponentUI
의 기술:null
가 반환되는 경우, 최소 사이즈는 대신에 컴퍼넌트의 레이아웃 매니저에 의해 계산됩니다 (이것은, 특정의 레이아웃 매니저를 인스톨 되어 있는 컴퍼넌트의 경우에 추천 하는 방법입니다). 이 메소드의 디폴트 구현은 getPreferredSize
를 호출해, 그 값을 돌려줍니다.
ComponentUI
내의 getMinimumSize
c
- 최소 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있다
Dimension
객체, 또는 null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
ComponentUI
의 기술:null
가 반환되는 경우, 최대 사이즈는 대신에 컴퍼넌트의 레이아웃 매니저에 의해 계산됩니다 (이것은, 특정의 레이아웃 매니저를 인스톨 되어 있는 컴퍼넌트의 경우에 추천 하는 방법입니다). 이 메소드의 디폴트 구현은 getPreferredSize
를 호출해, 그 값을 돌려줍니다.
ComponentUI
내의 getMaximumSize
c
- 최대 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있다
Dimension
객체, 또는 null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void calculateGeometry()
protected void calculateFocusRect()
protected void calculateThumbSize()
protected void calculateContentRect()
protected void calculateThumbLocation()
protected void calculateTrackBuffer()
protected void calculateTrackRect()
protected int getTickLength()
protected void calculateTickRect()
protected void calculateLabelRect()
protected Dimension getThumbSize()
protected int getWidthOfWidestLabel()
protected int getHeightOfTallestLabel()
protected int getWidthOfHighValueLabel()
protected int getWidthOfLowValueLabel()
protected int getHeightOfHighValueLabel()
protected int getHeightOfLowValueLabel()
protected boolean drawInverted()
protected Integer getHighestValue()
protected Integer getLowestValue()
protected Component getLowestValueLabel()
JSlider.setLabelTable(java.util.Dictionary)
protected Component getHighestValueLabel()
JSlider.setLabelTable(java.util.Dictionary)
public void paint(Graphics g, JComponent c)
ComponentUI
의 기술:ComponentUI.update
메소드로부터, 지정된 컴퍼넌트가 페인트 될 때 불려 갑니다. 서브 클래스는, 이 메소드를 오버라이드(override) 해, 지정된 Graphics
객체를 사용해 컴퍼넌트의 내용을 draw 할 필요가 있습니다.
ComponentUI
내의 paint
g
- 페인트 대상의 Graphics
문맥c
- 페인트 되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
protected void recalculateIfInsetsChanged()
protected void recalculateIfOrientationChanged()
public void paintFocus(Graphics g)
public void paintTrack(Graphics g)
public void paintTicks(Graphics g)
protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
public void paintLabels(Graphics g)
protected void paintHorizontalLabel(Graphics g, int value, Component label)
JSlider.setLabelTable(java.util.Dictionary)
protected void paintVerticalLabel(Graphics g, int value, Component label)
JSlider.setLabelTable(java.util.Dictionary)
public void paintThumb(Graphics g)
public void setThumbLocation(int x, int y)
public void scrollByBlock(int direction)
public void scrollByUnit(int direction)
protected void scrollDueToClickInTrack(int dir)
protected int xPositionForValue(int value)
protected int yPositionForValue(int value)
protected int yPositionForValue(int value, int trackY, int trackHeight)
trackHeight
가 부의 수였던 경우의 결과는 보증되지 않습니다.
value
- 위치를 취득하는 슬라이더치trackY
- 트럭의 y 원점trackHeight
- 트럭의 높이public int valueForYPosition(int yPos)
public int valueForXPosition(int xPos)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.