mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
added transparency
This commit is contained in:
+2
-3
@@ -31,7 +31,6 @@ import org.diylc.plugins.statusbar.StatusBar;
|
||||
import org.diylc.plugins.toolbox.ToolBox;
|
||||
import org.diylc.presenter.Presenter;
|
||||
|
||||
|
||||
public class MainFrame extends JFrame implements IView {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -64,7 +63,7 @@ public class MainFrame extends JFrame implements IView {
|
||||
presenter.installPlugin(new ToolBox());
|
||||
presenter.installPlugin(new FileManager());
|
||||
presenter.installPlugin(new ClipboardManager());
|
||||
// presenter.installPlugin(new OnlineManager());
|
||||
// presenter.installPlugin(new OnlineManager());
|
||||
presenter.installPlugin(new HelpManager());
|
||||
|
||||
presenter.installPlugin(new StatusBar());
|
||||
@@ -97,7 +96,7 @@ public class MainFrame extends JFrame implements IView {
|
||||
super.setVisible(b);
|
||||
// TODO: hack to prevent painting issues in the scroll bar rulers. Find
|
||||
// a better fix if possible.
|
||||
Timer timer = new Timer(200, new ActionListener() {
|
||||
Timer timer = new Timer(500, new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package org.diylc.gui.editor;
|
||||
|
||||
import javax.swing.JSlider;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
import org.diylc.common.PropertyWrapper;
|
||||
|
||||
public class ByteEditor extends JSlider {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ByteEditor(final PropertyWrapper property) {
|
||||
super();
|
||||
setMinimum(0);
|
||||
setMaximum(127);
|
||||
setValue((Byte) property.getValue());
|
||||
addChangeListener(new ChangeListener() {
|
||||
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
property.setValue(new Integer(getValue()).byteValue());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
+5
@@ -25,6 +25,11 @@ public class FieldEditorFactory {
|
||||
EnumEditor editor = new EnumEditor(property);
|
||||
return editor;
|
||||
}
|
||||
if (Byte.class.isAssignableFrom(property.getType())
|
||||
|| byte.class.isAssignableFrom(property.getType())) {
|
||||
ByteEditor byteEditor = new ByteEditor(property);
|
||||
return byteEditor;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user