|
|
@ -254,6 +254,16 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
downloadButton.addActionListener(new ActionListener() { |
|
|
|
downloadButton.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
initPopMenu(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return downloadButton; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 初始化下拉面板 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void initPopMenu() { |
|
|
|
UIPopupMenu menu = new UIPopupMenu(); |
|
|
|
UIPopupMenu menu = new UIPopupMenu(); |
|
|
|
UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download icon.png")); |
|
|
|
UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download icon.png")); |
|
|
|
UIMenuItem installItem = new UIMenuItem(Inter.getLocText("FR-Designer_Install_Template"), BaseUtils.readIcon("/com/fr/design/form/images/install icon.png")); |
|
|
|
UIMenuItem installItem = new UIMenuItem(Inter.getLocText("FR-Designer_Install_Template"), BaseUtils.readIcon("/com/fr/design/form/images/install icon.png")); |
|
|
@ -280,10 +290,8 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
|
|
|
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
|
|
|
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
|
|
|
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
installItem.addActionListener(new ActionListener() { |
|
|
|
installItem.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
@ -294,11 +302,9 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
if (returnValue == JFileChooser.APPROVE_OPTION) { |
|
|
|
if (returnValue == JFileChooser.APPROVE_OPTION) { |
|
|
|
final File chosenFile = fileChooser.getSelectedFile(); |
|
|
|
final File chosenFile = fileChooser.getSelectedFile(); |
|
|
|
installFromDiskZipFile(chosenFile); |
|
|
|
installFromDiskZipFile(chosenFile); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
deleteItem.addActionListener(new ActionListener() { |
|
|
|
deleteItem.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
@ -306,17 +312,11 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
deleteFromDiskZipFile(); |
|
|
|
deleteFromDiskZipFile(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, OFFSET_Y); |
|
|
|
GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, OFFSET_Y); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return downloadButton; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void deleteFromDiskZipFile() { |
|
|
|
private void deleteFromDiskZipFile() { |
|
|
|
deleteButton = new UIButton(Inter.getLocText("FR-Designer-CommitTab_Remove")); |
|
|
|
deleteButton = new UIButton(Inter.getLocText("FR-Designer-CommitTab_Remove")); |
|
|
|
|
|
|
|
|
|
|
|
deleteButton.setBackground(Color.red); |
|
|
|
deleteButton.setBackground(Color.red); |
|
|
|
deleteButton.repaint(); |
|
|
|
deleteButton.repaint(); |
|
|
|
deleteButton.setPreferredSize(new Dimension(240, 40)); |
|
|
|
deleteButton.setPreferredSize(new Dimension(240, 40)); |
|
|
|