javax.swing.JSlider.getSnapToTicks()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中javax.swing.JSlider.getSnapToTicks()方法的一些代码示例,展示了JSlider.getSnapToTicks()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.getSnapToTicks()方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:getSnapToTicks

JSlider.getSnapToTicks介绍

暂无

代码示例

代码示例来源:origin: khuxtable/seaglass

/**
   * {@inheritDoc}
   */
  public boolean isInState(JComponent c) {
    return ((JSlider) c).getSnapToTicks();
  }
}

代码示例来源:origin: pentaho/pentaho-reporting

public boolean getSnapToTicks() {
 return valueSlider.getSnapToTicks();
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
protected void calculateThumbLocation() {
  if (slider.getSnapToTicks()) {
    adjustSnapHighValue();
  }
  super.calculateThumbLocation();
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
protected void calculateThumbLocation() {
  if (slider.getSnapToTicks()) {
    adjustSnapHighValue();
  }
  super.calculateThumbLocation();
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
protected void calculateThumbLocation() {
  if (slider.getSnapToTicks()) {
    adjustSnapHighValue();
  }
  super.calculateThumbLocation();
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
protected void calculateThumbLocation() {
  if (slider.getSnapToTicks()) {
    adjustSnapHighValue();
  }
  super.calculateThumbLocation();
}

代码示例来源:origin: com.synaptix/SynaptixSwing

public void mouseReleased(MouseEvent e) {
  if (!slider.isEnabled()) {
    return;
  }
  offset = 0;
  scrollTimer.stop();
  // This is the way we have to determine snap-to-ticks. It's
  // hard to explain but since ChangeEvents don't give us any
  // idea what has changed we don't have a way to stop the thumb
  // bounds from being recalculated. Recalculating the thumb
  // bounds moves the thumb over the current value (i.e., snapping
  // to the ticks).
  if (slider.getSnapToTicks() /* || slider.getSnapToValue() */) {
    isDragging = false;
    slider.setValueIsAdjusting(false);
  } else {
    slider.setValueIsAdjusting(false);
    isDragging = false;
  }
  slider.repaint();
}

代码示例来源:origin: com.synaptix/SynaptixSwing

public void mouseReleased(MouseEvent e) {
  if (!slider.isEnabled()) {
    return;
  }
  offset = 0;
  scrollTimer.stop();
  // This is the way we have to determine snap-to-ticks. It's
  // hard to explain but since ChangeEvents don't give us any
  // idea what has changed we don't have a way to stop the thumb
  // bounds from being recalculated. Recalculating the thumb
  // bounds moves the thumb over the current value (i.e., snapping
  // to the ticks).
  if (slider.getSnapToTicks() /* || slider.getSnapToValue() */) {
    isDragging = false;
    slider.setValueIsAdjusting(false);
  } else {
    slider.setValueIsAdjusting(false);
    isDragging = false;
  }
  slider.repaint();
}

代码示例来源:origin: com.synaptix/SynaptixSwing

protected void calculateThumbLocation() {
  if (slider.getSnapToTicks()) {
    int sliderValue = slider.getValue();
    int snappedValue = sliderValue;

代码示例来源:origin: com.synaptix/SynaptixSwing

protected void calculateThumbLocation() {
  if (slider.getSnapToTicks()) {
    int sliderValue = slider.getValue();
    int snappedValue = sliderValue;

代码示例来源:origin: khuxtable/seaglass

protected void calculateThumbLocation() {
  if (slider.getSnapToTicks()) {
    int sliderValue = slider.getValue();
    int snappedValue = sliderValue;

代码示例来源:origin: igvteam/igv

if (slider.getSnapToTicks()) {
  int upperValue = slider.getValue() + slider.getExtent();
  int snappedValue = upperValue;

代码示例来源:origin: org.gephi/ui-components

if (slider.getSnapToTicks()) {
  int upperValue = slider.getValue() + slider.getExtent();
  int snappedValue = upperValue;

代码示例来源:origin: org.gephi/ui-components

if (slider.getSnapToTicks()) {
  int upperValue = slider.getValue() + slider.getExtent();
  int snappedValue = upperValue;

相关文章

JSlider类方法