|
|
@ -24,6 +24,7 @@ import com.fr.general.Background; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.general.ImageWithSuffix; |
|
|
|
import com.fr.general.ImageWithSuffix; |
|
|
|
import com.fr.general.act.TitlePacker; |
|
|
|
import com.fr.general.act.TitlePacker; |
|
|
|
|
|
|
|
import com.fr.report.core.cal.Rect; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
@ -115,10 +116,14 @@ public class TitleInsetImagePane extends JPanel implements UIObserver { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
super.mouseExited(e); |
|
|
|
super.mouseExited(e); |
|
|
|
|
|
|
|
int x = e.getX(); |
|
|
|
|
|
|
|
int y = e.getY(); |
|
|
|
|
|
|
|
if (x <= 0 || getWidth() <= x || y <= 0 || y >= getHeight()) { |
|
|
|
imagePreviewOverlayPane.setVisible(false); |
|
|
|
imagePreviewOverlayPane.setVisible(false); |
|
|
|
imageDeleteButton.setVisible(false); |
|
|
|
imageDeleteButton.setVisible(false); |
|
|
|
imageDeleteButton.setEnabled(false); |
|
|
|
imageDeleteButton.setEnabled(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createCommonTableLayoutPane( |
|
|
|
return TableLayoutHelper.createCommonTableLayoutPane( |
|
|
@ -146,6 +151,7 @@ public class TitleInsetImagePane extends JPanel implements UIObserver { |
|
|
|
IOUtils.readIcon("/com/fr/design/images/buttonicon/icon_delete_inset.png"), |
|
|
|
IOUtils.readIcon("/com/fr/design/images/buttonicon/icon_delete_inset.png"), |
|
|
|
new Color(51, 51, 52, 178), |
|
|
|
new Color(51, 51, 52, 178), |
|
|
|
2); |
|
|
|
2); |
|
|
|
|
|
|
|
imageDeleteButton.setEnabled(false); |
|
|
|
imageDeleteButton.setPreferredSize(new Dimension(DELETE_BUTTON_SIZE, DELETE_BUTTON_SIZE)); |
|
|
|
imageDeleteButton.setPreferredSize(new Dimension(DELETE_BUTTON_SIZE, DELETE_BUTTON_SIZE)); |
|
|
|
|
|
|
|
|
|
|
|
imagePreviewPane = new ImagePreviewPane(); |
|
|
|
imagePreviewPane = new ImagePreviewPane(); |
|
|
@ -207,20 +213,6 @@ public class TitleInsetImagePane extends JPanel implements UIObserver { |
|
|
|
}).dealWithImageFile(returnVal); |
|
|
|
}).dealWithImageFile(returnVal); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.imageDeleteButton.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
imagePreviewPane.setImageWithSuffix(null); |
|
|
|
|
|
|
|
imageLocationPane.setSelectedIndex(DEFAULT_INSET_LOCATION_INDEX); |
|
|
|
|
|
|
|
imagePaddingPane.setValue(DEFAULT_INSET_PADDING); |
|
|
|
|
|
|
|
imagePreviewOverlayPane.setVisible(false); |
|
|
|
|
|
|
|
imageDeleteButton.setVisible(false); |
|
|
|
|
|
|
|
imageDeleteButton.setEnabled(false); |
|
|
|
|
|
|
|
getComponent(1).setVisible(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fireStateChanged(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populateBean(TitlePacker packer) { |
|
|
|
public void populateBean(TitlePacker packer) { |
|
|
|