You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.fr.plugin.widget.clock.ui;
|
|
|
|
|
|
|
|
import com.fanruan.api.design.work.form.creator.Attribute;
|
|
|
|
import com.fanruan.api.design.work.form.creator.XOpenCreator;
|
|
|
|
import com.fanruan.api.util.IOKit;
|
|
|
|
import com.fr.plugin.widget.clock.fun.Clock;
|
|
|
|
|
|
|
|
import javax.swing.*;
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author richie
|
|
|
|
* @date 2015-03-23
|
|
|
|
* @since 8.0
|
|
|
|
*/
|
|
|
|
public class XClock extends XOpenCreator {
|
|
|
|
|
|
|
|
public XClock(Clock widget, Dimension initSize) {
|
|
|
|
super(widget, initSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected JComponent initEditor() {
|
|
|
|
if (editor == null) {
|
|
|
|
editor = new JLabel(IOKit.readIcon(getIconPath()));
|
|
|
|
}
|
|
|
|
return editor;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Attribute[] attributes() {
|
|
|
|
return new Attribute[0];
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getIconPath() {
|
|
|
|
return "/com/fr/plugin/widget/clock/images/clock.png";
|
|
|
|
}
|
|
|
|
}
|