public interface TabbedComponentFactory
class MyTabbedPane extends JTabbedPane implements Tabbed.Accessor {
private final Tabbed tabbedImpl = new Tabbed() {
//implement abstract methods while delegating most of them to JTabbedPane
};
public Tabbed getTabbed() {
return tabbedImpl;
}
}
Then inject your new implementation to the window system by registering your own TabbedComponentFactory:
@ServiceProvider(service=TabbedComponentFactory.class,position=1000)
public class MyTabbedPaneFactory implements TabbedComponentFactory {
public Tabbed createTabbedComponent( TabbedType type, WinsysInfoForTabbedContainer info ) {
return new MyTabbedPane().getTabbed();
}
}
| Modifier and Type | Method and Description |
|---|---|
Tabbed |
createTabbedComponent(TabbedType type,
WinsysInfoForTabbedContainer info)
Create Tabbed implementation for given type.
|
Tabbed createTabbedComponent(TabbedType type, WinsysInfoForTabbedContainer info)
type - Type of the container to be created.info - Information from the window system that may affect the look
and feel of the tab control.Built on May 24 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.