importBtn.setIcon(Icon.save.imageIcon());
importBtn.setToolTipText("Import a gradient");
importBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JDialog dialog = new TextInputDialog(
"Import Gradient", "Gradient data:",
GradientEditor.this);
dialog.setVisible(true);
}
});
exportBtn.setIcon(Icon.load.imageIcon());
exportBtn.setToolTipText("Export current gradient");
exportBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JDialog dialog = new TextOutputDialog(
"Export Gradient", "Gradient data:",
Sky.gradientJson(gradientUI.getGradient()).toCompactString());
dialog.setVisible(true);
}
});
posEdit.addActionListener(new ActionListener() {
@Override