本文整理了Java中javax.swing.JSlider.getMinorTickSpacing()
方法的一些代码示例,展示了JSlider.getMinorTickSpacing()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.getMinorTickSpacing()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:getMinorTickSpacing
暂无
代码示例来源:origin: stackoverflow.com
javax.swing.JSlider.getMajorTickSpacing()
javax.swing.JSlider.getMinorTickSpacing()
代码示例来源:origin: com.synaptix/SynaptixSwing
int snappedValue = sliderValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
代码示例来源:origin: stackoverflow.com
int iNewValue = degreesSlider.getValue() - degreesSlider.getMinorTickSpacing() ;
if (iNewValue >= degreesSlider.getMinimum())
int iNewValue = degreesSlider.getValue() + degreesSlider.getMinorTickSpacing() ;
if (iNewValue <= degreesSlider.getMaximum())
代码示例来源:origin: com.synaptix/SynaptixSwing
int snappedValue = sliderValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
代码示例来源:origin: de.sciss/submin
int xPos;
if (component.getMinorTickSpacing() > 0) {
while (value <= component.getMaximum()) {
xPos = xPositionForValue(value);
paintMinorTickForHorizontalSlider(g, tickBounds, xPos);
value += component.getMinorTickSpacing();
int yPos;
if (component.getMinorTickSpacing() > 0) {
int offset = 0;
if (!ltr) {
yPos = yPositionForValue(value);
paintMinorTickForVerticalSlider(g, tickBounds, yPos);
value += component.getMinorTickSpacing();
代码示例来源:origin: khuxtable/seaglass
int snappedValue = sliderValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
代码示例来源:origin: com.jidesoft/jide-oss
protected void adjustSnapHighValue() {
int sliderValue = ((RangeSlider) slider).getHighValue();
int snappedValue = sliderValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
if (minorTickSpacing > 0) {
tickSpacing = minorTickSpacing;
}
else if (majorTickSpacing > 0) {
tickSpacing = majorTickSpacing;
}
if (tickSpacing != 0) {
// If it's not on a tick, change the value
if ((sliderValue - slider.getMinimum()) % tickSpacing != 0) {
float temp = (float) (sliderValue - slider.getMinimum())
/ (float) tickSpacing;
int whichTick = Math.round(temp);
snappedValue =
slider.getMinimum() + (whichTick * tickSpacing);
}
if (snappedValue != sliderValue) {
((RangeSlider) slider).setHighValue(snappedValue);
}
}
}
代码示例来源:origin: com.jidesoft/jide-oss
protected void adjustSnapHighValue() {
int sliderValue = ((RangeSlider) slider).getHighValue();
int snappedValue = sliderValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
if (minorTickSpacing > 0) {
tickSpacing = minorTickSpacing;
}
else if (majorTickSpacing > 0) {
tickSpacing = majorTickSpacing;
}
if (tickSpacing != 0) {
// If it's not on a tick, change the value
if ((sliderValue - slider.getMinimum()) % tickSpacing != 0) {
float temp = (float) (sliderValue - slider.getMinimum())
/ (float) tickSpacing;
int whichTick = Math.round(temp);
snappedValue =
slider.getMinimum() + (whichTick * tickSpacing);
}
if (snappedValue != sliderValue) {
((RangeSlider) slider).setHighValue(snappedValue);
}
}
}
代码示例来源:origin: com.jidesoft/jide-oss
protected void adjustSnapHighValue() {
int sliderValue = ((RangeSlider) slider).getHighValue();
int snappedValue = sliderValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
if (minorTickSpacing > 0) {
tickSpacing = minorTickSpacing;
}
else if (majorTickSpacing > 0) {
tickSpacing = majorTickSpacing;
}
if (tickSpacing != 0) {
// If it's not on a tick, change the value
if ((sliderValue - slider.getMinimum()) % tickSpacing != 0) {
float temp = (float) (sliderValue - slider.getMinimum())
/ (float) tickSpacing;
int whichTick = Math.round(temp);
snappedValue =
slider.getMinimum() + (whichTick * tickSpacing);
}
if (snappedValue != sliderValue) {
((RangeSlider) slider).setHighValue(snappedValue);
}
}
}
代码示例来源:origin: com.jidesoft/jide-oss
protected void adjustSnapHighValue() {
int sliderValue = ((RangeSlider) slider).getHighValue();
int snappedValue = sliderValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
if (minorTickSpacing > 0) {
tickSpacing = minorTickSpacing;
}
else if (majorTickSpacing > 0) {
tickSpacing = majorTickSpacing;
}
if (tickSpacing != 0) {
// If it's not on a tick, change the value
if ((sliderValue - slider.getMinimum()) % tickSpacing != 0) {
float temp = (float) (sliderValue - slider.getMinimum())
/ (float) tickSpacing;
int whichTick = Math.round(temp);
snappedValue =
slider.getMinimum() + (whichTick * tickSpacing);
}
if (snappedValue != sliderValue) {
((RangeSlider) slider).setHighValue(snappedValue);
}
}
}
代码示例来源:origin: com.jtattoo/JTattoo
int xPos;
if (slider.getMinorTickSpacing() > 0) {
while (value <= slider.getMaximum()) {
xPos = xPositionForValue(value);
paintMinorTickForHorizSlider(g, tickBounds, xPos);
value += slider.getMinorTickSpacing();
int yPos;
if (slider.getMinorTickSpacing() > 0) {
int offset = 0;
if (!leftToRight) {
yPos = yPositionForValue(value);
paintMinorTickForVertSlider(g, tickBounds, yPos);
value += slider.getMinorTickSpacing();
代码示例来源:origin: org.java.net.substance/substance
min = slider.getMinorTickSpacing();
int xPos = 0;
if (slider.getMinorTickSpacing() > 0) {
while (value <= slider.getMaximum()) {
xPos = xPositionForValue(value);
paintMinorTickForHorizSlider(g, tickBounds, xPos);
value += slider.getMinorTickSpacing();
int yPos = 0;
if (slider.getMinorTickSpacing() > 0) {
int offset = 0;
if (!QuaquaUtilities.isLeftToRight(slider)) {
yPos = yPositionForValue(value);
paintMinorTickForVertSlider(g, tickBounds, yPos);
value += slider.getMinorTickSpacing();
代码示例来源:origin: com.github.insubstantial/substance
int xPos;
if (slider.getMinorTickSpacing() > 0) {
while (value <= slider.getMaximum()) {
xPos = xPositionForValue(value);
paintMinorTickForHorizSlider(g, tickBounds, xPos);
value += slider.getMinorTickSpacing();
int yPos;
if (slider.getMinorTickSpacing() > 0) {
int offset = 0;
if (!QuaquaUtilities.isLeftToRight(slider)) {
yPos = yPositionForValue(value);
paintMinorTickForVertSlider(g, tickBounds, yPos);
value += slider.getMinorTickSpacing();
代码示例来源:origin: com.synaptix/SynaptixSwing
min = slider.getMinorTickSpacing();
int xPos = 0;
if (slider.getMinorTickSpacing() > 0) {
while (value <= slider.getMaximum()) {
xPos = xPositionForValue(value);
paintMinorTickForHorizSlider(g, tickBounds, xPos);
value += slider.getMinorTickSpacing();
int yPos = 0;
if (slider.getMinorTickSpacing() > 0) {
int offset = 0;
if (!slider.getComponentOrientation().isLeftToRight()) {
yPos = yPositionForValue(value);
paintMinorTickForVertSlider(g, tickBounds, yPos);
value += slider.getMinorTickSpacing();
代码示例来源:origin: igvteam/igv
int snappedValue = upperValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
代码示例来源:origin: com.synaptix/SynaptixSwing
min = slider.getMinorTickSpacing();
int xPos = 0;
if (slider.getMinorTickSpacing() > 0) {
while (value <= slider.getMaximum()) {
xPos = xPositionForValue(value);
paintMinorTickForHorizSlider(g, tickBounds, xPos);
value += slider.getMinorTickSpacing();
int yPos = 0;
if (slider.getMinorTickSpacing() > 0) {
int offset = 0;
if (!slider.getComponentOrientation().isLeftToRight()) {
yPos = yPositionForValue(value);
paintMinorTickForVertSlider(g, tickBounds, yPos);
value += slider.getMinorTickSpacing();
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
int xPos = 0;
if (slider.getMinorTickSpacing() > 0) {
while (value <= slider.getMaximum()) {
xPos = xPositionForValue(value);
paintMinorTickForHorizSlider(g, tickBounds, xPos);
value += slider.getMinorTickSpacing();
int yPos = 0;
if (slider.getMinorTickSpacing() > 0) {
int offset = 0;
if (!slider.getComponentOrientation().isLeftToRight()) {
yPos = yPositionForValue(value);
paintMinorTickForVertSlider(g, tickBounds, yPos);
value += slider.getMinorTickSpacing();
代码示例来源:origin: org.gephi/ui-components
int snappedValue = upperValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
代码示例来源:origin: org.gephi/ui-components
int snappedValue = upperValue;
int majorTickSpacing = slider.getMajorTickSpacing();
int minorTickSpacing = slider.getMinorTickSpacing();
int tickSpacing = 0;
代码示例来源:origin: org.bidib.jbidib/jbidibc-ui
int xPos = 0;
if (slider.getMinorTickSpacing() > 0) {
int majorValue = slider.getMinimum();
int yPos = 0;
if (slider.getMinorTickSpacing() > 0) {
int majorValue = slider.getMinimum();
int offset = 0;
内容来源于网络,如有侵权,请联系作者删除!