本文整理了Java中javax.swing.JSlider.setUI()
方法的一些代码示例,展示了JSlider.setUI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.setUI()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:setUI
暂无
代码示例来源:origin: stackoverflow.com
JSlider s = new JSlider();
s.setUI(new MetalSnapSliderUI());
代码示例来源:origin: palantir/Cinch
private void addExtentsHighlight(JSlider slider) {
slider.setUI(new ExtentHighlightingSliderUI(slider));
}
代码示例来源:origin: stackoverflow.com
JSlider s = new JSlider();
s.setUI( new mySliderUI( s ) );
代码示例来源:origin: stackoverflow.com
slider.setMinorTickSpacing(5);
slider.setMajorTickSpacing(25);
slider.setUI(new CustomSliderUI(slider));
frame.add(slider);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
代码示例来源:origin: stackoverflow.com
JSlider slider00 = new JSlider(0,10,5);
JSlider slider01 = new JSlider(0,10,5);
slider01.setUI(new MetalSliderUI() {
protected TrackListener createTrackListener(JSlider slider) {
return new TrackListener() {
代码示例来源:origin: entertailion/Fling
volume.setUI(new MySliderUI(volume));
volume.setMajorTickSpacing(25);
代码示例来源:origin: lbalazscs/Pixelitor
slider.setUI(new ColorPickerSliderUI(slider,this));
hexField.getDocument().addDocumentListener(hexDocListener);
setMode(BRI);
代码示例来源:origin: stackoverflow.com
bottom.setUI( new MySliderUI1() );
top.setUI( new MySliderUI2() );
top.setOpaque(false);
代码示例来源:origin: stackoverflow.com
getContentPane().add( slider );
slider.setUI( new MySliderUI() );
代码示例来源:origin: stackoverflow.com
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
MySliderUI ms = new MySliderUI(slider,this);
slider.setUI(ms);
slider.setMajorTickSpacing(10);
slider.setMinorTickSpacing(5);
代码示例来源:origin: stackoverflow.com
@Override public void updateUI() {
super.updateUI();
setUI(new MetalSliderUI() {
@Override protected TrackListener createTrackListener(JSlider slider) {
return new TrackListener() {
代码示例来源:origin: stackoverflow.com
JSliderExt.this.setUI((SliderUI) sliderUi);
setUI(this.uix);
updateLabelUIs();
代码示例来源:origin: org.java.net.substance/substance
/**
* Configures a JSlider for this ColorSliderModel.
* If the JSlider is already configured for another ColorSliderModel,
* it is unconfigured first.
*/
public void configureColorSlider(int component, JSlider slider) {
if (slider.getClientProperty("ColorSliderModel") != null) {
((ColorSliderModel) slider.getClientProperty("ColorSliderModel"))
.unconfigureColorSlider(slider);
}
if ( ! (slider.getUI() instanceof ColorSliderUI)) {
slider.setUI(new ColorSliderUI(slider));
}
slider.setModel(getBoundedRangeModel(component));
slider.putClientProperty("ColorSliderModel", this);
slider.putClientProperty("ColorComponentIndex", new Integer(component));
addColorSlider(slider);
}
代码示例来源:origin: stackoverflow.com
JSlider slider1 = makeSlider();
JSlider slider2 = makeSlider();
slider2.setUI(new BasicSliderUI(slider2) {
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
/**
* Configures a JSlider for this model.
* If the JSlider is already configured for another model,
* it is unconfigured first.
*/
@Override
public void configureSlider(int componentIndex, JSlider slider) {
if (slider.getClientProperty("colorSliderModel") != null) {
((DefaultColorSliderModel) slider.getClientProperty("colorSliderModel")).unconfigureSlider(slider);
}
if (!(slider.getUI() instanceof ColorSliderUI)) {
slider.setUI((ColorSliderUI) ColorSliderUI.createUI(slider));
}
slider.setModel(getBoundedRangeModel(componentIndex));
slider.putClientProperty("colorSliderModel", this);
slider.putClientProperty("colorComponentIndex", componentIndex);
addColorSlider(slider);
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
/**
* Configures a JSlider for this model.
* If the JSlider is already configured for another model,
* it is unconfigured first.
*/
@Override
public void configureSlider(int componentIndex, JSlider slider) {
if (slider.getClientProperty("colorSliderModel") != null) {
((DefaultColorSliderModel) slider.getClientProperty("colorSliderModel")).unconfigureSlider(slider);
}
if (!(slider.getUI() instanceof PaletteColorSliderUI)) {
slider.setUI((PaletteColorSliderUI) PaletteColorSliderUI.createUI(slider));
}
BoundedRangeModel brm = getBoundedRangeModel(componentIndex);
slider.setModel(brm);
slider.putClientProperty("colorSliderModel", this);
slider.putClientProperty("colorComponentIndex", componentIndex);
addColorSlider(slider);
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Configures a JSlider for this ColorSliderModel.
* If the JSlider is already configured for another ColorSliderModel,
* it is unconfigured first.
*/
public void configureColorSlider(int component, JSlider slider) {
if (slider.getClientProperty("ColorSliderModel") != null) {
((ColorSliderModel) slider.getClientProperty("ColorSliderModel"))
.unconfigureColorSlider(slider);
}
if ( ! (slider.getUI() instanceof ColorSliderUI)) {
slider.setUI(new ColorSliderUI(slider));
slider.createStandardLabels(16);
}
slider.setModel(getBoundedRangeModel(component));
slider.putClientProperty("ColorSliderModel", this);
slider.putClientProperty("ColorComponentIndex", component);
addColorSlider(slider);
}
代码示例来源:origin: com.synaptix/SynaptixSwing
dayWidthSlider.setUI(new DayWidthSliderUI());
代码示例来源:origin: com.synaptix/SynaptixSwing
private void initComponents() {
createComponents();
resourcesPanel.setSimpleTimeline(this);
datesPanel.setSimpleTimeline(this);
internalTimelinePanel.setSimpleTimeline(this);
resourcesPanel.addMouseListener(new ResourcesMouseListener());
resourcesViewport.setView(resourcesPanel);
resourcesViewport.addChangeListener(new ResourcesViewportChangeListener());
datesPanel.addDatesListener(this);
datesViewport.setView(datesPanel);
datesViewport.addChangeListener(new DatesViewportChangeListener());
internalTimelinePanel.setTransferHandler(new MyTransferHandler());
internalTimelinePanel.addMouseListener(new CenterMouseListener());
internalTimelineViewport.setView(internalTimelinePanel);
verticalScrollBar.getModel().addChangeListener(new VerticalScrollBarChangeListener());
horizontalScrollBar.getModel().addChangeListener(new HorizontalScrollBarChangeListener());
weekCalendarPanel.addChangeListener(new CalendarPanelChangeListener());
MyMouseWheelListener mwl = new MyMouseWheelListener();
resourcesViewport.addMouseWheelListener(mwl);
internalTimelineViewport.addMouseWheelListener(mwl);
verticalScrollBar.addMouseWheelListener(mwl);
internalTimelineViewport.addComponentListener(new MyComponentListener());
sliderPanelChangeListener = new SliderPanelChangeListener();
dayWidthSlider.addChangeListener(sliderPanelChangeListener);
dayWidthSlider.setUI(new DayWidthSliderUI());
minusLabel.setBorder(null);
plusLabel.setBorder(null);
}
内容来源于网络,如有侵权,请联系作者删除!