1 /** 2 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 3 * use this file except in compliance with the License. You may obtain a copy of 4 * the License at 5 * 6 * http://www.apache.org/licenses/LICENSE-2.0 7 * 8 * Unless required by applicable law or agreed to in writing, software 9 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 * License for the specific language governing permissions and limitations under 12 * the License. 13 */ 14 package de.funfried.netbeans.plugins.editor.closeleftright; 15 16 import java.util.logging.Logger; 17 18 import javax.swing.AbstractAction; 19 20 import org.openide.windows.TopComponent; 21 22 /** 23 * Base class for closing actions. 24 * 25 * @author bahlef 26 */ 27 public abstract class AbstractBaseAction extends AbstractAction { 28 private static final long serialVersionUID = -9120253952276652530L; 29 30 private static final Logger log = Logger.getLogger(AbstractBaseAction.class.getName()); 31 32 /** the related {@link TopComponent} of this action. */ 33 protected final TopComponent topComponent; 34 35 /** 36 * Constructor of abstract class {@link AbstractBaseAction}. 37 * 38 * @param name the name of this action 39 * @param topComponent the {@link TopComponent} 40 */ 41 protected AbstractBaseAction(String name, TopComponent topComponent) { 42 super(name); 43 44 this.topComponent = topComponent; 45 } 46 }