All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.tidalwave.integritychecker.ui.impl.netbeans.IntegrityCheckerPresentationTopComponent Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
/***********************************************************************************************************************
 *
 * SolidBlue - open source safe data
 * Copyright (C) 2011-2012 by Tidalwave s.a.s. (http://tidalwave.it)
 *
 ***********************************************************************************************************************
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations under the License.
 *
 ***********************************************************************************************************************
 *
 * WWW: http://solidblue.tidalwave.it
 * SCM: https://bitbucket.org/tidalwave/solidblue-src
 *
 **********************************************************************************************************************/
package it.tidalwave.integritychecker.ui.impl.netbeans;

import javax.annotation.Nonnull;
import org.openide.util.NbBundle;
import org.openide.util.Utilities;
import org.openide.windows.TopComponent;
import it.tidalwave.actor.netbeans.windows.ActorTopComponent;
import it.tidalwave.integritychecker.ui.IntegrityCheckerPresentation;
import it.tidalwave.integritychecker.ui.spi.IntegrityCheckerUIActivator;
import static org.openide.windows.TopComponent.*;

/***********************************************************************************************************************
 * 
 * @stereotype Presentation
 * 
 * @author  Fabrizio Giudici
 * @version $Id$
 *
 **********************************************************************************************************************/
// FIXME: workaround, in 7.2 the annotations for this topcomponent don't work
// There's a custom layer.xml to work around this
// See http://netbeans.org/bugzilla/show_bug.cgi?id=219852
@TopComponent.Description(preferredID = "IntegrityCheckerPresentationTopComponent",
                          persistenceType = PERSISTENCE_NEVER)
@TopComponent.Registration(mode = "center", openAtStartup = true)
public final class IntegrityCheckerPresentationTopComponent extends ActorTopComponent
  {
    public IntegrityCheckerPresentationTopComponent() 
      {
        super(createContent(), new IntegrityCheckerUIActivator());
        setName(NbBundle.getMessage(IntegrityCheckerPresentationTopComponent.class, "CTL_IntegrityCheckerPresentationTopComponent"));
      }
    
    @Nonnull
    private static IntegrityCheckerPresentation createContent()
      {
        return Utilities.isMac() ? new MacOSXIntegrityCheckerPresentationPanel() : new IntegrityCheckerPresentationPanel();
      }
  }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy