e797. 显示JSlider的标记
The slider supports two levels of tick marks, major and minor. Typically, the minor tick-mark spacing is smaller than the major tick-mark spacing. Also, the minor tick-mark spacing is a multiple of the major tick-mark spacing. However, the slider does not enforce any of these constraints.
// Create a horizontal slider that moves left-to-right
JSlider slider = new JSlider();
// Determine if currently showing ticks
boolean b = slider.getPaintTicks(); // false // Show tick marks
slider.setPaintTicks(true); // Set major tick marks every 25 units
int tickSpacing = 25;
slider.setMajorTickSpacing(tickSpacing); // Set minor tick marks every 5 units
tickSpacing = 5;
slider.setMinorTickSpacing(tickSpacing);
Related Examples |
e797. 显示JSlider的标记的更多相关文章
- e798. 显示JSlider的标记标签
This example demonstrates how to display labels (numerical values) at the major ticks (see e797 显示JS ...
- e799. 限制JSlider的数值在标记以内
By default, the slider can take on any value from the minimum to the maximum. It is possible to conf ...
- Android之解析GML并显示
本例主要实现在APP中解析GML数据并显示 GML,地理标记语言(外语全称:Geography MarkupLanguage.外语缩写:GML),它由开放式地理信息系统协会(外语缩写:OGC)于199 ...
- Creating Icon Overlay Handlers / 创建图标标记 Handlers (翻译自MSDN) / VC++, Windows, DLL, ATL, COM
创建图标标记 Handlers Creating Icon Overlay Handlers 图标标记是放在代表着某个 Shell 对象的图标之左下角的小图像.它们通常被加在一个对象的图标的身上来提供 ...
- Delphi控件的显示内容与显示边框是两回事
没有内容,不代表没有边框.比如设计期一个空的TImage仍是有边框的. if (csOpaque in image1.ControlStyle) then ShowMessage('不透明')else ...
- OSG和osgearth显示中文(转载)
osgEarth支持中文过程详解 OSG和osgearth显示中文 一.知识储备 要想很好的理解和解决这个问题,首先要了解什么是多字节和宽字节.说实话我之前也知道这两个字节到底有什么区别,只是简单 ...
- Confluence 6 为翻译显示用户界面的键(Key)名称
这个功能在你使用 Confluence 用户界面为 Confluence 创建翻译的时候会非常有用.当你打开主面板的时候,在你访问的 URL 的最后面添加下面的文字:can add the follo ...
- 页面回到顶部的三种实现(锚标记,js)
一.使用锚标记返回页面顶部 使用HTML锚标记最简单,就是看起来有点不好看,点击后会在地址栏显示这个锚标记,其它的倒没什么. 页面顶部放置: <a name="top" id ...
- windowsclient开发--怎样測量一个字符串显示的物理长度
首先须要说明的是,我所说的字符串的长度,不是string的length,也不是string的size.我指的是显示的长度.即物理长度. 缘由: 之所以要提到这个.是由于遇到了一些问题. 再使用duil ...
随机推荐
- artificial%20intelligence%20a%20modern%20approach
http://stpk.cs.rtu.lv/sites/all/files/stpk/materiali/mi/artificial%20intelligence%20a%20modern%20app ...
- [AWS vs Azure] 云计算里AWS和Azure的探究(3)
云计算里AWS和Azure的探究(3) ——Amazon EC2 和 Windows Azure Virtual Machine 今天我来比较一下AWS EC2和Azure VM的具体流程上的异同.以 ...
- javascript基础拾遗(二)
1.对象定义 定义属性 var language = { name:'javascript', score:9.0 }; console.log(language.name) console.log( ...
- iOS应用管理(字典转模型)
1. 新建appViewModel 1.1声明需要的属性 //NSString一般用copy来修饰 @property(nonatomic,copy)NSString *name; @property ...
- iOS 添加功能引导图
iOS 添加功能引导图 首次安装app之后,打开app首页,有一张功能引导图,其实最简单的一种做法是,直接在这个首页上加一个蒙层图片. 在蒙层上用气泡显示文字注明功能介绍,这个蒙层图片,让你们的UI设 ...
- 使用typed.js实现页面上的写字功能
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Windows下MFC程序利用LockCop解决死锁
死锁现象:在训练的时候,点击“终止”按钮时不时会发生死锁. 检测工具:LockCop.TRACE宏.::GetCurrentThreadID函数. 检测手段: 总结起来就是—— 第一步:用LockCo ...
- 【Linux】crontab 定时启动sh
crontab -e 20点59分启动脚本 59 20 * * * sh /home/fzuir/xingye4crawl/endXingYe4Crawl.sh >/home/fzuir/xin ...
- NLTK和jieba这两个python的自然语言包(HMM,rnn,sigmoid
HMM(Hidden Markov Model,隐马尔可夫模型) CRF(Conditional Random Field,条件随机场), RNN深度学习算法(Recurrent Neural Net ...
- PostgreSQL ALTER TABLE中改变数据类型时USING的用法<转>
在修改表字段类型的时候使用Using来进行显示的转换类型. 原文说明: SET DATA TYPE This form changes the type of a column of a table ...