Giter Site home page Giter Site logo

mgarin / weblaf Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 234.0 123.13 MB

WebLaF is a fully open-source Look & Feel and component library written in pure Java for cross-platform desktop Swing applications.

Home Page: http://weblookandfeel.com

License: GNU General Public License v3.0

Java 100.00%
components cross-platform java look-and-feel skin swing swing-components ui weblaf

weblaf's People

Contributors

bobbylight avatar dawoife avatar dependabot[bot] avatar devcharly avatar expixel avatar greg2001 avatar iamchathu avatar ianp avatar jordeu avatar macstrace avatar mgarin avatar ndandoulakis avatar nmagre avatar nsofronov avatar phxql avatar sciss avatar sorceror avatar whitehsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

weblaf's Issues

Enhance WebLaF to fit as NetBeans look and feel

I tried setting weblaf as the LAF for the Netbeans IDE and the results were mostly unpleasant. Is this something that could be enhanced? There are many Java applications built upon the Netbeans Platform (mine included), and they look pretty awful using weblaf as the LAF for the entire application. The only usable solution right now is to use another global LAF, and then add weblaf components throughout the application.

image

Tabbed pane rendering enhancements

There are currently multiple issues with tabbed pane:

  • It is not rendered properly with RTL orientation
  • Only TOP tab location properly supported
  • Incorrect old-style focus rendering
  • Scroll layout is not properly supported
  • Tab title pads are not properly visually connected to the content area

On top of that it is still not using decorations and painters properly.
Some major improvements and changes are required.

Add more values to UIManager

To facilitate folks writing custom components, particularly without a hard dependency on WebLookAndFeel goodness, it would be really helpful if you fleshed out the UIDefaults table.

I don't have an exhaustive list, and surely some things might not make much sense with how much custom rendering WebLaF does, but picking some sensible defaults for e.g. foreground and background colors (and even borders) would be awesome. For example, the particular one I ran into was MenuItem.background is not defined (maybe picking up whatever was set in BasicLookAndFeel?). *.foreground and *.background properties are probably pretty easy to fill in. Text(Field|Area).selection(Foreground|Background) as well are picking up the BasicLookAndFeel values.

Another super handy one for me would be TextField.border/TextArea.border. Again, if the text component border painting isn't a true Swing Border, picking a sensible default would be way better than what you inherit from BasicLookAndFeel, which is a 90's-era BevelBorder. :)

The BasicLookAndFeel#initComponentDefaults() method is obviously the place to look for possibilities of properties to set.

BTW, this LookAndFeel is mighty nice! I know the real usage pattern is to go in whole hog, but I hope you don't forget folks like me who want to keep WebLookAndFeel simply an option in their application. I'll be happy to cobble up a pull request for this if you have higher priorities.

OS X Window Decoration.

On OS X the window decorations should be coloured blobs in the top left corner, not the Windows style widgets which appear in the top right.

Editing filename on the WebFileChooser

In the WebFileChooser, if we select a file and focus the textbox to edit the name, the Backspace deletes the previous character as expected, but the Delete, instead of erasing the next character prompts to delete the selected file.

Build fails - incorrect file name

The build is currently b0rked:

[javac] /Users/ianp/Projects/weblaf/src/com/alee/laf/menu/MenubarStyle.java:26: error: class MenuBarStyle is public, should be declared in a file named MenuBarStyle.java
[javac] public enum MenuBarStyle

The file MenubarStyle.java should be MenuBarStyle.java. So a pretty easy fix :-)

File chooser current directory issues

There are a few known issues with "setCurrentDirectory" method:

  1. Calling method "setCurrentDirectory" points chooser to root folder in all cases on Linux systems. That seems to be some problem in nodes search mechanism.
  2. Directory doesn't change after "cancel" action to the same one that was set in file chooser before (or was selected by user before) since its not properly updated in JFileChooser model.

Tree Node Selection Rendering

When using this LAF with Netbeans IDE, I noticed the following behavior:

If you click on the element in the tree, the row gets highlighted AND a blue bounding box is drawn around the text; the result does not look that great.

screenshot

as compared to rendering in Metal:

screenshot-metal

WebFileChooser does not have save file mode

WebFileChooser only allows to pick files that already exist, it does not allow a save mode to create new files. This is a standard feature for a file dialog and should be present.

Toolbar overflow capability

Often times I have a toolbar loaded with items, and depending on the screen real estate available there might not be enough room to see all of the items, so the ones that don't fit simply get clipped off the end. The Netbeans Platform recently added a ToolBarWithOverflow widget that solves this issue, and I thought a similar component would be a great thing to add to your component library. When there are too many items, some indication (a down arrow) is given that there are more items available, and hovering over that indication displays a popup toolbar with the remaining items. Personally I would love to see this not only for a regular toolbar, but for your breadcrumb bars as well. Typically those will contain more text than a normal toolbar, and therefore have an even higher need for an overflow mechanism.

Wrong button order in option panes.

The order of buttons in the OptionPaneUI should be platform dependent. On OS X (and possibly Linux/Gnome, I'm not sure) the rightmost button should be the default button. In other words where on Windows you have [Ok] [Cancel] on the OSX it would be [Cancel] [OK].

There similar to JavaFX Modena theme

One problem that I believe many Swing developers are probably facing, or will be facing soon, is how to migrate existing Swing applications to JavaFX in the future. A current approach is to slowly integrate JavaFX components into an existing Swing application, but the look and feel of the components are very different. I believe that there is a need to create a JavaFX Modena theme for Swing so that mixed (Swing and JavaFX) applications can look great together.

Is this something that your new StyleManager would be able to facilitate? For a complete rundown of what the Modena theme is like, take a look at http://fxexperience.com/2013/03/modena-theme-update/.

Freezes applets

To install, I use:

WebLookAndFeel.install();
WebLookAndFeel.setDecorateFrames(true);

inside of main, and add the Applet in constructor via:

WebFrame#add(Applet); // preferred size set on applet
WebFrame#pack(); // obviously not static method, just using as example
WebFrame#setVisible(true);

WebFileChooser bugs

when you open the filechooser it always starts on top of the filesystem, setCurrentDirectory() doesn't work...

and the back/forward-buttons are enabled at the beginning, if you click on one of them you get an ArrayIndexOutOfBoundsException

filechooser: FileElement cannot be cast to java.io.File

Looks like I've got the same problem discussed here:
http://weblookandfeel.com/forum/viewtopic.php?f=4&t=144

It is labeled [SOLVED], but I use the latest Build 1.13 with Linux and Sun JDK 7.

I am testing a simple WebFileChooser with SelectionMode.SINGLE_SELECTION and clicking on any file leads to the following stacktrace:

java.lang.ClassCastException: com.alee.extended.list.FileElement cannot be cast to java.io.File
    at com.alee.extended.filechooser.WebFileChooserPanel.getSelectedFiles(Unknown Source)
    at com.alee.extended.filechooser.WebFileChooserPanel.updateChosenFiles(Unknown Source)
    at com.alee.extended.filechooser.WebFileChooserPanel.access$1400(Unknown Source)
    at com.alee.extended.filechooser.WebFileChooserPanel$20.valueChanged(Unknown Source)
    at javax.swing.JList.fireSelectionValueChanged(JList.java:1798)
...

WebDirectoryChooser new directory name

When using the WebDirectoryChooser, creating a new directory gives it the default name (usually, "New Folder" on Windows) and doesn't allow it to be changed.

Add checkbox tree component

Add WebCheckBoxTree component that allows checking tree nodes using a special checkbox control provided near the node in the tree. That will also require a special tristate checkbox component: #41

Add tristate checkbox component

Add WebTristateCheckBox component that has 3 check states (unlike simple checkbox that has only two states - checked/unchecked).

File dialog: new folder: can't set name when the folder is empty.

Using the file dialog.

If you try to create a new folder in an empty folder using the new folder button in the toolbar, new new folder is created with the name "New folder" and there is no way to edit it.

Normally (when the folder is not empty) the new folder appear in name edition mode so you can set the name before it is actually created.

There is no workaround as when you right click the folder there is no menu to allow renaming (there is no pop up menu at all). Also, as soon as you enable weblab as the look and feel you get the weblaf file dialog even if you use the swing file dialog instead of the web file dialog.

Correction, if I type letters even though there is no folder name edition box and press enter, the name of the folder is set properly. The editor is just not visible, that's the issue.

WebLaF makes JOptionPane.showInputDialog useless

I didn't debug to figure out the reason, but the effect is easy to reproduce:

        System.out.println(JOptionPane.showInputDialog(null, "a", "b"));
        WebLookAndFeel.install();
        System.out.println(JOptionPane.showInputDialog(null, "a", "b"));

The first dialog prints out, what you type.
The second one (after WebLookAndFeel is installed) always prints "b".

Tested with Realese 1.17 and 1.19.

NullPointer when changing to another L&F

Moved from: https://code.google.com/p/weblookandfeel/issues/detail?id=5

Following NPE occurs when changing L&F in runtime (from WebLaF to another L&F):

java.lang.NullPointerException
at com.alee.laf.menu.WebMenuItemUI$2.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.menuDragMouseReleased(BasicMenuItemUI.java:943)
at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:585)
at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:482)
at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:428)
at javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:322)
at javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.eventDispatched(BasicPopupMenuUI.java:869)
at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2430)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2322)
at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2280)
at java.awt.Component.dispatchEventImpl(Component.java:4757)
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.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
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:723)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
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:696)
at java.awt.EventQueue$4.run(EventQueue.java:694)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)

File breadcrumb popups do not disappear

I tried the file breadcrumbs in the 1.17 demo application, and for each segment of the breadcrumb, the popup would not go away once it appeared.

Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Mac OS X version 10.8.4 running on x86_64; US-ASCII; en_US (nb)

screen shot 2013-08-21 at 11 23 33 am

Dark Theme

I am still having this idea that there could be a dark theme. It doesn't have to be a completely different design like futurico. For example, a first straight forward approximation could be to just invert the brightness of all colors. (I have just inverted RGB and rotated the hue afterwards):

weblafdark

What do you think? Is this easy to accomplish? A better variant would also make sure gradient orientations are maintained (e.g. if going from lighter to darker top to bottom, it should remain that way)

JFileChooser doen't work with custom file filters, or showing hidden files

I have that code:

JFileChooser chooser = new JFileChooser();
chooser.setFileFilter(new PropertyFilter());
chooser.setAcceptAllFileFilterUsed(false);
chooser.setFileHidingEnabled(false);
int response = chooser.showOpenDialog(this);

With MetalLookAndFeel, file chooser works fine, but if I install WebLookAndFeel (WebLookAndFeel.install( ) ), then it doesn't show hidden files and I can see all files.

image

image

Add async checkbox tree component

Add WebAsyncCheckBoxTree component which is similar to WebCheckBoxTree component (#31) but uses an AsyncDataProvider to fill its model with data.

Default JFileChooser does not render

When using WebLookAndFeel the default JFileChooser opens as an empty window with no controls, and since WebFileChooser is in alpha/beta stage there is no viable alternative to pick the location where to save a file when using WebLookAndFeel

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.