Giter Site home page Giter Site logo

jedwards1211 / jhrome Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 9.0 1.36 MB

Google Chrome-style tabbed panes for Java!

License: GNU Lesser General Public License v3.0

Perl 18.37% Java 81.63%
java-swing tabbed-view look-and-feel chrome-tabs swing java

jhrome's Introduction

     ___________________
____/ Welcome to Jhrome \__________________________________________________

This is Jhrome, a Google Chrome-style tabbed pane library for Java.

     ______________
____/ License Info \_______________________________________________________

Jhrome is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Jhrome 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Jhrome.  If not, see <http://www.gnu.org/licenses/>.

     _________________
____/ Getting Started \____________________________________________________

See org/sexydock/tabs/demos/GettingStarted.java.  Here's a snippet:

// To turn on Google Chrome-style tabs for all JTabbedPanes in an existing
// application, simply put the following code in your application startup:

UIManager.getDefaults( ).put( "TabbedPaneUI" , JhromeTabbedPaneUI.class.getName( ) );

final JTabbedPane tabbedPane = new JTabbedPane( );

// Or, just set the tabbed pane's UI directly:

tabbedPane.setUI( new JhromeTabbedPaneUI( ) );

// Now the tabbed pane will look like Google Chrome, but besides letting
// you reorder its tabs, it won't let you do anything special beyond
// BasicTabbedPaneUI behavior.

// To turn on tab close buttons, do this:

tabbedPane.putClientProperty( JhromeTabbedPaneUI.TAB_CLOSE_BUTTONS_VISIBLE , true );

// But how to make the window close when the user closes the last tab? Use this:

tabbedPane.addContainerListener( new DefaultTabsRemovedHandler( ) );

// To turn on the new tab button, do this:

tabbedPane.putClientProperty( JhromeTabbedPaneUI.NEW_TAB_BUTTON_VISIBLE , true );

// Not so fast! The new tab button won't work yet. You have to define how the
// content of new tabs is created. Here's how: (see GettingStarted.java to continue)

..................

For an example of a basic full-featured tabbed application, see
org/sexydock/tabs/demos/NotepadDemo.java.
				
To see all examples, run org.sexydock.tabs.demos.SexyTabsDemos.  The program
displays source code for the examples and allows you to launch them.

If you have other questions, check the Javadocs in org.sexydock.tabs.TabbedPane, 
or send me an e-mail.
 
     _______________________________________
____/ Todo / Unsupported functions / Issues \______________________________

The following are known to be issues:

-There may be memory leaks caused by JhromeTabbedPaneUI that prevent 
disposed
windows from being garbage collected/allowing the VM to shut down
automatically when the last window is closed.
-The ghost drag image window doesn't work on some systems (as it
depends on AWTUtilities window transparency controls).  I need to add a
check to automatically disable window transparency when not supported.

The following JTabbedPane functions are currently known to be unsupported
by JhromeTabbedPaneUI:

-JTabbedPane.setForeground/BackgroundAt( int , Color ) (planned)
-JTabbedPane.addTab( 0 , null ) (not planning to support null tab content)
-keyboard navigation except for mnemonics (arrow keys etc. are not yet 
supported)
-left and right tab placement (planned)

The following need to be done eventually:

-A nice TabUI that *doesn't* look like Google Chrome
-Detailed color customization
-Custom tab reordering policies (to allow you to force a specific tab to
stay at one end, etc.

     ___________
____/ Compiling \__________________________________________________________

The use of window transparency depends on Java SE 6 Update 10.

Other than that, if you want to compile src/test, you'll need 
fest-swing-1.2 and its dependencies.  I haven't Mavenized this process yet.

     ________
____/ Status \_____________________________________________________________

This project is currently in beta stage.  It works very well, but there are
no automated tests, it needs more documentation, and it needs more polish
in areas like look and feel workflow and allowing access to tab DnD state.

I'm going ahead and releasing it because I'm quite busy at the moment, and
if I wait until it's polished enough for a first release, well, I'll never
get around to it.  On the other hand, if I do release it now, I'll probably
be more motivated to polish it up in the future.

The root package is org.sexydock.tabs because I may make an entire docking
framework based around this, if I feel like it.  If so, that framework will
be called SexyDock, and this project will be called SexyTabs, or 
SexyDock.Tabs, or whatever. In the package scheme, Jhrome refers 
specifically to the Google Chrome look in the org.sexydock.jhrome package.  
I'm releasing this project as "Jhrome" because I think the name will catch 
on better.

     _________
____/ Contact \____________________________________________________________

Jhrome was created by James ("Andy") Edwards.
e-mail: [email protected]

jhrome's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jhrome's Issues

floating the tab

java.lang.ClassCastException: java.lang.String cannot be cast to java.io.InputStream
at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1368)
at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2323)
at sun.awt.datatransfer.DataTransferer.processDataConversionRequests(DataTransferer.java:2380)
at sun.awt.X11.XSelection.waitForSelectionNotify(XSelection.java:179)
at sun.awt.X11.XSelection.getData(XSelection.java:295)
at sun.awt.X11.XDnDDropTargetProtocol.getData(XDnDDropTargetProtocol.java:859)
at sun.awt.X11.XDropTargetContextPeer.getNativeData(XDropTargetContextPeer.java:151)
at sun.awt.dnd.SunDropTargetContextPeer.getTransferData(SunDropTargetContextPeer.java:263)
at sun.awt.datatransfer.TransferableProxy.getTransferData(TransferableProxy.java:73)
at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(DropTargetContext.java:376)
at org.sexydock.InternalTransferableStore.getTransferableData(InternalTransferableStore.java:61)
at org.sexydock.tabs.jhrome.JhromeTabbedPaneUI.getDragInfo(JhromeTabbedPaneUI.java:2009)
at org.sexydock.tabs.jhrome.JhromeTabbedPaneUI.access$34(JhromeTabbedPaneUI.java:2004)
at org.sexydock.tabs.jhrome.JhromeTabbedPaneUI$DropHandler.dragEnter(JhromeTabbedPaneUI.java:1954)
at java.awt.dnd.DropTarget.dragEnter(DropTarget.java:357)
at sun.awt.dnd.SunDropTargetContextPeer.processEnterMessage(SunDropTargetContextPeer.java:330)
at sun.awt.X11.XDropTargetContextPeer.processEnterMessage(XDropTargetContextPeer.java:165)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEnterEvent(SunDropTargetContextPeer.java:798)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:766)
at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:48)
at java.awt.Component.dispatchEventImpl(Component.java:4716)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4620)
at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4558)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4417)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
java.io.IOException: Owner failed to convert data
at sun.awt.X11.XSelection.validateDataGetter(XSelection.java:444)
at sun.awt.X11.XSelection.getData(XSelection.java:305)
at sun.awt.X11.XDnDDropTargetProtocol.getData(XDnDDropTargetProtocol.java:859)
at sun.awt.X11.XDropTargetContextPeer.getNativeData(XDropTargetContextPeer.java:151)
at sun.awt.dnd.SunDropTargetContextPeer.getTransferData(SunDropTargetContextPeer.java:263)
at sun.awt.datatransfer.TransferableProxy.getTransferData(TransferableProxy.java:73)
at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(DropTargetContext.java:376)
at org.sexydock.InternalTransferableStore.getTransferableData(InternalTransferableStore.java:61)
at org.sexydock.tabs.jhrome.JhromeTabbedPaneUI.getDragInfo(JhromeTabbedPaneUI.java:2009)
at org.sexydock.tabs.jhrome.JhromeTabbedPaneUI.access$34(JhromeTabbedPaneUI.java:2004)
at org.sexydock.tabs.jhrome.JhromeTabbedPaneUI$DropHandler.dragEnter(JhromeTabbedPaneUI.java:1954)
at java.awt.dnd.DropTarget.dragEnter(DropTarget.java:357)
at sun.awt.dnd.SunDropTargetContextPeer.processEnterMessage(SunDropTargetContextPeer.java:330)
at sun.awt.X11.XDropTargetContextPeer.processEnterMessage(XDropTargetContextPeer.java:165)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEnterEvent(SunDropTargetContextPeer.java:798)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:766)
at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:48)
at java.awt.Component.dispatchEventImpl(Component.java:4716)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4620)
at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4558)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4417)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

get Tooltip per tab working

With this patch (karolherbst@06299bf) I tried to get tooltips to work. Tooltips are showing up, but the drag and drop functionality (or every other mouse event) seems to be destroyed.

I am adding the tooltips staticly in the TabFactory and dynamically over the JTabbedPane (ToolTip shall change depending on the content)

Could you give me any help what is wrong here?

switch to LGPL or GPL+ClassPathException?

Hi,
I found your project and it seems to be a good JTabbedPane replacement with more features. I would use it, but because I want to use it in propritary software I can't.

It would be nice to hear something from your because of this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.