0
swtで浮動小数点値でスケールを表示するにはどうすればよいですか?SWTスケールウィジェット - 浮動小数点値
これは、内部的に整数に取り組んでいますので、あなたはそれが山車を自分で扱う作る必要があるでしょう、私が今持っているもの
Group groupTime = new Group(shell, SWT.BORDER);
groupTime.setLayout(new GridLayout(1,true));
groupTime.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false,false, 1, 1));
new Label(groupTime, SWT.NONE).setText("Speed in seconds:");
Scale scale = new Scale (groupTime, SWT.BORDER);
scale.setMaximum (10);
Label speedLabel = new Label(groupTime, SWT.NONE);
speedLabel.setText("time");
scale.addListener(SWT.Selection, new Listener()
{
public void handleEvent(Event event)
{
speedLabel.setText(scale.getSelection()+"");
}
});
おかげ
これは私が必要としていたものです。ありがとう:) – NoaG