Skip to content

Commit

Permalink
1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
lyy289065406 committed Oct 30, 2018
1 parent 8dcdff7 commit 42a4f88
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 17 deletions.
Binary file added doc/cron-ui-cs.exe
Binary file not shown.
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!--项目基本信息(必填)-->
<groupId>exp.cron</groupId>
<artifactId>cron-expression</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<packaging>jar</packaging>

<name>cron表达式配置工具</name>
Expand Down Expand Up @@ -148,6 +148,17 @@
<copy todir="${release.dir}/conf">
<fileset dir="conf" />
</copy>

<echo>拷贝web页面文件</echo>
<copy todir="${release.dir}/web/Cron">
<fileset dir="web/Cron" />
</copy>

<echo>拷贝界面启动文件</echo>
<copy file="./index.html"
tofile="${release.dir}/cron-ui-bs.html" />
<copy file="./doc/cron-ui-cs.exe"
tofile="${release.dir}/cron-ui-cs.exe" />
</target>
</configuration>
</execution>
Expand Down
18 changes: 8 additions & 10 deletions src/main/java/exp/cron/ui/CronUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public class CronUI extends MainWindow {
protected final static String SECOND = "秒", MINUTE = "分", HOUR = "时",
DAY = "日期", MONTH = "月份", WEEK = "星期", YEAR = "年份";

private final static int WIDTH = 800;
private final static int WIDTH = 920;

private final static int HEIGHT = 680;
private final static int HEIGHT = 740;

private Cron cron;

Expand Down Expand Up @@ -91,16 +91,16 @@ protected void initComponents(Object... args) {
tfWeek.setEditable(false);
tfYear.setEditable(false);

this.copyBtn = new JButton("复制");
this.copyBtn = new JButton("复 制 cron 表 达 式");
copyBtn.setForeground(Color.BLACK);
BeautyEyeUtils.setButtonStyle(NormalColor.lightBlue, copyBtn);
}

@Override
protected void setComponentsLayout(JPanel rootPanel) {
rootPanel.add(toContralPanel(), BorderLayout.NORTH);
// rootPanel.add(toSchedulePanel(), BorderLayout.CENTER);
// rootPanel.add(createBtn, BorderLayout.SOUTH);
rootPanel.add(toExpressionPanel(), BorderLayout.CENTER);
rootPanel.add(copyBtn, BorderLayout.SOUTH);
}

private JPanel toContralPanel() {
Expand All @@ -114,10 +114,8 @@ private JPanel toContralPanel() {
tabbedPanel.add(new _WeekPanel(cron, "星期"), WEEK);
tabbedPanel.add(new _YearPanel(cron, "年"), YEAR);
}
SwingUtils.addBorder(tabbedPanel, "Contral");
SwingUtils.addBorder(tabbedPanel, "Control");
panel.add(tabbedPanel, BorderLayout.CENTER);

panel.add(toExpressionPanel(), BorderLayout.SOUTH);
}
return panel;
}
Expand All @@ -139,8 +137,8 @@ private JPanel toExpressionPanel() {

panel.add(new JLabel(" "), BorderLayout.CENTER);

panel.add(SwingUtils.getWEBorderPanel(
new JLabel("Cron表达式 : "), tfExpression, copyBtn
panel.add(SwingUtils.getWBorderPanel(
tfExpression, new JLabel("Cron表达式 : ")
), BorderLayout.SOUTH);
}
SwingUtils.addBorder(panel, "Expression");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/exp/cron/ui/_MinutePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class _MinutePanel extends __TimePanel {
private final static int MINUTE = 60;

protected _MinutePanel(Cron cron, String name) {
super(cron, name, 4);
super(cron, name, 6);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/exp/cron/ui/_MonthPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class _MonthPanel extends __TimePanel {
private static final long serialVersionUID = -7775377611552787648L;

protected _MonthPanel(Cron cron, String name) {
super(cron, name, 2);
super(cron, name, 3);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/exp/cron/ui/_SecondPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class _SecondPanel extends __TimePanel {
private final static int SECOND = 60;

protected _SecondPanel(Cron cron, String name) {
super(cron, name, 4);
super(cron, name, 6);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/exp/cron/ui/_WeekPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected CheckBoxGroup<String> initSequence() {
protected JPanel getEveryPanel() {
return SwingUtils.getHFlowPanel(FlowLayout.LEFT,
everyBtn,
new JLabel(" (注:星期1=周日、星期2=周一、星期3=周二、星期4=周三、星期5=周四、星期6=周五、星期7=周六)"));
new JLabel("(注:星期1=周日、星期2=周一、星期3=周二、星期4=周三、星期5=周四、星期6=周五、星期7=周六)"));
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/exp/cron/ui/_YearPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public class _YearPanel extends __TimePanel {
/** serialVersionUID */
private static final long serialVersionUID = 6055405583848024179L;

private final static int YEAR = 43; // 最多显示往后40年(理论cron最大的年份是2099年)
private final static int YEAR = 76; // 最多显示往后76年(理论cron最大的年份是2099年)

protected _YearPanel(Cron cron, String name) {
super(cron, name, 4);
super(cron, name, 7);
}

@Override
Expand Down

0 comments on commit 42a4f88

Please sign in to comment.