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.
32 lines
707 B
32 lines
707 B
7 years ago
|
package com.fr.plugin.widget.clock.ui;
|
||
|
|
||
|
import com.fr.design.designer.creator.XWidgetCreator;
|
||
|
import com.fr.general.IOUtils;
|
||
|
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 XWidgetCreator {
|
||
|
|
||
|
public XClock(Clock widget, Dimension initSize) {
|
||
|
super(widget, initSize);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected JComponent initEditor() {
|
||
|
if (editor == null) {
|
||
|
editor = new JLabel(IOUtils.readIcon(getIconPath()));
|
||
|
}
|
||
|
return editor;
|
||
|
}
|
||
|
|
||
|
public String getIconPath() {
|
||
|
return "/com/fr/plugin/widget/clock/images/clock.png";
|
||
|
}
|
||
|
}
|