Added new Service Provider Interface TabbedComponentFactory to make it possible to change the implementation of Tabbed +
+Refactor moved Interface Tabbed from core.windows to make it part of + a public API. Now it can be implemented by alternative controls to the default + implementation (TabbedAdapter). +
+SwitcherTable
and SwitcherTableItem
see a javadoc.
-
+ TabbedComponentFactory
needs to be registered
+ as a Service Provider via the ServiceProvider annotation. The implementation is used by core.windows to create Tabbed Components when required.TabbedComponentFactory
and Tabbed
see the javadoc.
+
+ SimpleContainer
.
- * There will be at two implementations one for view and second one for editor type.
+ * Interface for a pseudo JTabbedPane API for the actual tab control.
+ * Default implementation is based on nb specific TabbedContainer
.
*
* @author Peter Zavadsky
*/
public interface Tabbed {
+ /**
+ * Give a visual hint (e.g. blink) to draw attention to this TopComponent
+ * @param tc
+ */
public void requestAttention(TopComponent tc);
public void cancelRequestAttention(TopComponent tc);
diff --git a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/customtabs/TabbedComponentFactory.java b/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/customtabs/TabbedComponentFactory.java
new file mode 100644
--- /dev/null
+++ b/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/customtabs/TabbedComponentFactory.java
@@ -0,0 +1,61 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License. When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2009 Sun Microsystems, Inc.
+ */
+
+package org.netbeans.swing.tabcontrol.customtabs;
+
+/**
+ * Service Interface used by the Window System for creating NetBeans specific
+ * Tabbed Containers. Use this if you want to provide an alternative implementation
+ * (e.g. based on JTabbedPane).
+ * Implement to return your own implementation of Tabbed. Make it available by
+ * registering as a ServiceProvider using this annotation:
+ * @ServiceProvider(service=TabbedComponentFactory.class,supersedes="org.netbeans.core.windows.view.ui.DefaultTabbedComponentFactory" )
+ *
+ * @since 1.17
+ * @author maxnitribitt
+ */
+public interface TabbedComponentFactory {
+/**
+ * Get the Tabbed implementation for this type (Editor / View)
+ * @param type
+ * @return
+ */
+ public Tabbed getTabbedComponent(int type);
+
+}