neilcsmith-net commented on code in PR #7171:
URL: https://github.com/apache/netbeans/pull/7171#discussion_r1531797261
##########
platform/core.windows/src/org/netbeans/core/windows/view/EditorView.java:
##########
@@ -257,6 +250,64 @@ public void dropActionChanged(DropTargetDragEvent dtde) {
setOpaque( false);
}
+ private JComponent initBackgroundComponent() {
+ JComponent imageComponent = null;
+ String imageSource = Constants.SWITCH_IMAGE_SOURCE; // NOI18N
+ if (imageSource == null) {
+ FileObject config =
FileUtil.getConfigFile("Windows2/Background");
+ if (config != null) {
+ Object attr = config.getAttribute("backgroundImage");
+ if (attr instanceof String) {
+ imageSource = (String) attr;
+ }
+ }
+ }
+ if (imageSource != null) {
+ Image image = ImageUtilities.loadImage(imageSource);
+ if (image != null) {
+ JLabel label = new
JLabel(ImageUtilities.image2Icon(image));
+ label.setMinimumSize(new Dimension(0, 0)); // XXX To be
able shrink the area.
+ imageComponent = label;
+ } else {
+
Logger.getLogger(EditorView.class.getName()).log(Level.WARNING, null,
+ new java.lang.NullPointerException("Image not
found at "
Review Comment:
Well, not my code, this was moved from elsewhere in the file. But have
removed the redundant text in latest update.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists