X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalviewTaskbar.java;h=c7abababac9b3c12e8abd5bdad4211783283ae71;hb=d811732f53c406304e5b5302ba986b56e00a36a2;hp=574726345236a70adae5ba64d88d1fa417f9d6bb;hpb=a4da7f0f52e97ebb3fb0c42d6ab3a71762c4b899;p=jalview.git diff --git a/src/jalview/bin/JalviewTaskbar.java b/src/jalview/bin/JalviewTaskbar.java index 5747263..c7ababa 100644 --- a/src/jalview/bin/JalviewTaskbar.java +++ b/src/jalview/bin/JalviewTaskbar.java @@ -1,8 +1,30 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.bin; import java.awt.Image; import java.awt.Taskbar; +import jalview.util.ChannelProperties; + public class JalviewTaskbar { public JalviewTaskbar() @@ -11,29 +33,23 @@ public class JalviewTaskbar protected static void setTaskbar(Jalview jalview) { - + if (Taskbar.isTaskbarSupported()) { Taskbar tb = Taskbar.getTaskbar(); if (tb.isSupported(Taskbar.Feature.ICON_IMAGE)) { - try + Image image = ChannelProperties.getImage("logo.512"); + if (image != null) { - java.net.URL url = jalview.getClass() - .getResource("/images/JalviewLogo_Huge.png"); - if (url != null) - { - Image image = java.awt.Toolkit.getDefaultToolkit() - .createImage(url); - tb.setIconImage(image); - } - } catch (Exception e) + tb.setIconImage(image); + } + else { - e.printStackTrace(); + System.out.println("Unable to setIconImage()"); } } } } - }