Coder Social home page Coder Social logo

substance's People

Contributors

antonulasevich avatar chaddiller avatar ivanrf avatar kirill-grouchnikov avatar martinec avatar pirola 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

substance's Issues

Type Test on List renderer

At this line src/org/pushingpixels/substance/internal/ui/SubstanceListUI.java#L153 there is a test with the renderer. Why you don't test the returned cell instead of the renderer

if (!(list.getCellRenderer() instanceof SubstanceDefaultListCellRenderer)) { 

if (!(list.getCellRenderer().getTreeCellRendererComponent(...) instanceof SubstanceDefaultListCellRenderer)) { 

My renderer use the component returned by your SubstanceDefaultListCellRenderer, but the fade animation is not available by this way without this modification.

Thanks

Provide an artifact for Maven

I've been told this version of substance is not available on Maven. Do you have plans to distribute it through Maven? As our build system depends on that we currently have to use Insubstantial 7.3 as this is what available there. We would like to switch to the newer version at some point.

Pixelated components when using Java 9 w/ HiDPI

Since Java 9 added HiDPI compatibility, all components (such as arrows, buttons, tabs...) in Substance look pixelated.

This is probably caused by some conflict between Substance's implementation of HiDPI and Swing's new HiDPI features.

Errors when trying to build a project with Substance and Java 9

We are using Substance in Spark IM client - https://github.com/igniterealtime/Spark

Version of Substance

From Maven: com.github.insubstantial, substance-swingx, 7.3
I know this is not exactly same Substance as this one (it's a fork). Maybe this is already not an issue?

Version of Java

JDK 9.0.1

Version of OS

Windows 7 x64

The issue you're experiencing (expected vs actual, screenshot, stack trace etc)

When trying to build a project with Java 9 in IntelliJ getting these errors:

SEVERE: Unable to load plugin org.jivesoftware.sparkimpl.plugin.viewer.PluginViewer.
java.lang.NullPointerException
at org.pushingpixels.substance.internal.utils.SubstanceColorUtilities.getDefaultBackgroundColor(SubstanceColorUtilities.java:759)
at org.pushingpixels.substance.internal.utils.SubstanceColorUtilities.getBackgroundFillColor(SubstanceColorUtilities.java:661)
at org.pushingpixels.substance.internal.ui.SubstancePanelUI._orgpushingpixelssubstanceinternaluiSubstancePanelUI_installDefaults(SubstancePanelUI.java:74)
at org.pushingpixels.substance.internal.ui.SubstancePanelUI.installDefaults(SubstancePanelUI.java)
at org.pushingpixels.substance.swingx.SubstancePanelUI._orgpushingpixelssubstanceswingxSubstancePanelUI_installDefaults(SubstancePanelUI.java)
at org.pushingpixels.substance.swingx.SubstancePanelUI.installDefaults(SubstancePanelUI.java)
at java.desktop/javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:62)
at org.pushingpixels.substance.internal.ui.SubstancePanelUI._orgpushingpixelssubstanceinternaluiSubstancePanelUI_installUI(SubstancePanelUI.java)
at org.pushingpixels.substance.internal.ui.SubstancePanelUI.installUI(SubstancePanelUI.java)
at org.pushingpixels.substance.swingx.SubstancePanelUI._orgpushingpixelssubstanceswingxSubstancePanelUI_installUI(SubstancePanelUI.java)
at org.pushingpixels.substance.swingx.SubstancePanelUI.installUI(SubstancePanelUI.java)
at java.desktop/javax.swing.JComponent.setUI(JComponent.java:685)
at java.desktop/javax.swing.JPanel.setUI(JPanel.java:150)
at java.desktop/javax.swing.JPanel.updateUI(JPanel.java:126)
at java.desktop/javax.swing.JPanel.(JPanel.java:86)
at java.desktop/javax.swing.JPanel.(JPanel.java:109)
at java.desktop/javax.swing.JPanel.(JPanel.java:117)
at org.jivesoftware.sparkimpl.plugin.viewer.PluginViewer.(PluginViewer.java:79)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at java.base/java.lang.Class.newInstance(Class.java:558)
at org.jivesoftware.spark.PluginManager.lambda$loadInternalPlugins$0(PluginManager.java:492)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

...removed unrelated errors...

java.lang.reflect.InvocationTargetException
at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1328)
at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1303)
at org.jivesoftware.Spark.startup(Spark.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.jivesoftware.launcher.Startup.start(Startup.java:88)
at org.jivesoftware.launcher.Startup.main(Startup.java:38)
Caused by: java.lang.NullPointerException
at org.pushingpixels.substance.internal.utils.SubstanceColorUtilities.getDefaultBackgroundColor(SubstanceColorUtilities.java:759)
at org.pushingpixels.substance.internal.utils.SubstanceColorUtilities.getBackgroundFillColor(SubstanceColorUtilities.java:661)
at org.pushingpixels.substance.internal.ui.SubstancePanelUI._orgpushingpixelssubstanceinternaluiSubstancePanelUI_installDefaults(SubstancePanelUI.java:74)
at org.pushingpixels.substance.internal.ui.SubstancePanelUI.installDefaults(SubstancePanelUI.java)
at org.pushingpixels.substance.swingx.SubstancePanelUI._orgpushingpixelssubstanceswingxSubstancePanelUI_installDefaults(SubstancePanelUI.java)
at org.pushingpixels.substance.swingx.SubstancePanelUI.installDefaults(SubstancePanelUI.java)
at java.desktop/javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:62)
at org.pushingpixels.substance.internal.ui.SubstancePanelUI._orgpushingpixelssubstanceinternaluiSubstancePanelUI_installUI(SubstancePanelUI.java)
at org.pushingpixels.substance.internal.ui.SubstancePanelUI.installUI(SubstancePanelUI.java)
at org.pushingpixels.substance.swingx.SubstancePanelUI._orgpushingpixelssubstanceswingxSubstancePanelUI_installUI(SubstancePanelUI.java)
at org.pushingpixels.substance.swingx.SubstancePanelUI.installUI(SubstancePanelUI.java)
at java.desktop/javax.swing.JComponent.setUI(JComponent.java:685)
at java.desktop/javax.swing.JPanel.setUI(JPanel.java:150)
at java.desktop/javax.swing.JPanel.updateUI(JPanel.java:126)
at java.desktop/javax.swing.JPanel.(JPanel.java:86)
at java.desktop/javax.swing.JPanel.(JPanel.java:109)
at java.desktop/javax.swing.JPanel.(JPanel.java:117)
at java.desktop/javax.swing.JRootPane.createGlassPane(JRootPane.java:521)
at java.desktop/javax.swing.JRootPane.(JRootPane.java:348)
at java.desktop/javax.swing.JFrame.createRootPane(JFrame.java:279)
at java.desktop/javax.swing.JFrame.frameInit(JFrame.java:258)
at java.desktop/javax.swing.JFrame.(JFrame.java:181)
at org.jivesoftware.Spark.lambda$startup$1(Spark.java:195)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Process finished with exit code 0

SubstanceTitlePane requests

My company required me to modify the title bar at the top of the windows so that the title text is centered and there is a custom icon on the right. The custom icon is rather wide.

I was able to implement this, but it was difficult and could be made easier with some changes to `SubstanceTitlePane' class.

I realize that class is part of the "internal" code and there are no guarantees that it will continue to be supported, etc. But still, I'll request anyway. If you have time someday, maybe update that class so that it can optionally center the text and the layout does not make assumptions that all icons are the same size?

One of the trickiest parts to creating my sub-class is that the method addMenuItems() is private. Could that be made protected instead?

NullPointerException in RootPaneDefaultButtonTracker

There is a possibility of a rare NullPointerException in RootPaneDefaultButtonTracker caused by what seems to me a simple logic error.

Basically, these two lines in RootPaneDefaultButtonTracker should be reversed:

tracker.startTimer();
trackers.put(jButton, tracker);

You should not start the timer loop before the tracker has been associated with the button in the map. Otherwise, this later code can produce a NullPointerException:

RootPaneDefaultButtonTracker tracker = trackers.get(jButton);
tracker.stopTimer();

An alternative fix is to put a check for tracker==null before calling tracker.stopTimer()

The bug is very, very rare, but I have seen it happen. I found and fixed this issue on a forked version:
Insubstantial#137

A stack trace is included there. The root cause still exists in Substance 7.1.

maven artifacts

Do you provide maven artifacts for the latest substance release?
(cannot find it on maven-central)

JOptionPane Memory Leak

Hi Kirill,

I reported the problem before. However, it was here a memory problem with JDialog. It seems the OptionPane also remains in memory.
You gave me the classes

Kirill

Two immediate places that come to mind:

  • SubstanceRootPaneUI
  • RootPaneDefaultButtonTracker

I have inserted the code attached in the SubstanceRootPaneUI#uninstallListener() method.
Do JOptionPane and JDialog behave differently based on the default button?
I need a tip, so that JOptionPane does not remain in memory!

Attached Code:

RootPaneDefaultButtonTracker tracker = RootPaneDefaultButtonTracker.trackers.get(jButton);
if (tracker != null) {
tracker.stopTimer();
tracker.buttonRef.clear();
}
RootPaneDefaultButtonTracker.trackers.remove(jButton);

Best regards,
Pirol Aydin

3rd party library

Hi,
We use a 3rd party library for viewing maps. This library does not support scaling. It works fine in Windows, but in OSX the maps are blurry. Do you have any ideas how this can be solved? Where to start?

Regards,
Erling Fagerlie

Cannot easily change icons in JOptionPane

In most Swing LAFs, it is possible to change the icons in JOptionPane by code such as this:

UIManager.getDefaults().put("OptionPane.questionIcon", new MyFancyIcon());

This does not work in Substance 7.1.

One workaround is to override the SubstanceOptionPaneUI class and use

`UIManager.getDefaults().put("OptionPaneUI", MyOptionPaneUI.class.getCanonicalName());`

and in MyOptionPaneUI, override "getIconForType()".

Retina 200%

When running the ribbon application on a Hi DPI 200% I get the following result:
image
The task menu is behind. How can I fix this?

Mouse cursor doesn't revert after resizing

The mouse cursor doesn't always revert to the normal pointer after resizing or hovering over the border to resize, it will simply stay in it's resizing state until manually set back to the normal cursor.
Happens more frequently on OSX than on Windows but does occur on both.

alpha value out of range - appears

Hello Kirill,

sometimes I got the following errormessage. What does it mean, can you help?

Best regards,
Pirol A.

java.lang.IllegalArgumentException: alpha value out of range
at java.awt.AlphaComposite.(Unknown Source)
at java.awt.AlphaComposite.getInstance(Unknown Source)
at java.awt.AlphaComposite.derive(Unknown Source)
at org.pushingpixels.lafwidget.LafWidgetUtilities.getAlphaComposite(LafWidgetUtilities.java:615)
at org.pushingpixels.substance.internal.ui.SubstanceButtonUI.__org__pushingpixels__substance__internal__ui__SubstanceButtonUI__icon__paintIcon(SubstanceButtonUI.java:438)
at org.pushingpixels.substance.internal.ui.SubstanceButtonUI.paintIcon(SubstanceButtonUI.java)
at org.pushingpixels.substance.internal.ui.SubstanceButtonUI.paint(SubstanceButtonUI.java:345)
at org.pushingpixels.substance.internal.ui.SubstanceButtonUI.__org__pushingpixels__substance__internal__ui__SubstanceButtonUI__update(SubstanceButtonUI.java:491)
at org.pushingpixels.substance.internal.ui.SubstanceButtonUI.update(SubstanceButtonUI.java)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Bug Graphite Chalk border?

Hi, i have noticed that only Graphite Chalk as this colored border. is this a bug or is it intentional?
immagine
I guess is not intentional it seems pretty "strange".
If need i can post the code but i guess is not necessary it is just a blank form with just the LaF.

NPE in SubstanceColorUtilities.getBackgroundFillColor

I'm using a third-party check box component who calls print in its updateUI method to extract some info on the rendering. The problem is that the component must be painted but is not already on a hierarchy. SubstanceColorUtilities.getBackgroundFillColor() takes the parent component to get the background color but doesn't check if the parent is not null.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.pushingpixels.substance.internal.utils.SubstanceColorUtilities.getBackgroundFillColor(SubstanceColorUtilities.java:689)
at org.pushingpixels.substance.internal.painter.BackgroundPaintingUtils.update(BackgroundPaintingUtils.java:122)
at org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI.paint(SubstanceRadioButtonUI.java:324)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
at org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI.__org__pushingpixels__substance__internal__ui__SubstanceRadioButtonUI__update(SubstanceRadioButtonUI.java)
at org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI.update(SubstanceRadioButtonUI.java)
at org.pushingpixels.substance.internal.ui.SubstanceCheckBoxUI.__org__pushingpixels__substance__internal__ui__SubstanceCheckBoxUI__update(SubstanceCheckBoxUI.java)
at org.pushingpixels.substance.internal.ui.SubstanceCheckBoxUI.update(SubstanceCheckBoxUI.java)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.printComponent(JComponent.java:1193)
at javax.swing.JComponent.paint(JComponent.java:1033)
at javax.swing.JComponent.print(JComponent.java:1175)
at chrriis.dj.swingsuite.JTriStateCheckBox.findIndeterminateColor(JTriStateCheckBox.java:328)
at chrriis.dj.swingsuite.JTriStateCheckBox.updateUI(JTriStateCheckBox.java:302)
at javax.swing.AbstractButton.init(AbstractButton.java:2149)
at javax.swing.JToggleButton.(JToggleButton.java:159)
at javax.swing.JCheckBox.(JCheckBox.java:157)
at javax.swing.JCheckBox.(JCheckBox.java:109)
at chrriis.dj.swingsuite.JTriStateCheckBox.(JTriStateCheckBox.java:147)
at ctec.sdk.uiUtil.component.CTTristateCheckBox$2.run(CTTristateCheckBox.java:54)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

NPE in SubstanceTreeUI

I recently set up a JTree with drag and drop support and found that in Substance 6.1 SubstanceTreeUI throws an exception when either there is only one node in the tree and you drag it, or when you try to drag a node onto an empty tree. This is happening at line 524, as the code is not taking into account the possibility that the oldBounds returned by getPathBounds(tree, oldDrop) can return null.

Java 9 Issue?

Version of Substance

7.3

Version of Java

9.0.1

Version of OS

macOS 10.13.1

The issue you're experiencing (expected vs actual, screenshot, stack trace etc)

Hi, I was trying to compile a Minecraft custom launcher by https://github.com/SKCraft/Launcher. I successfully compiled the launcher, but upon running it I get these errors:

https://pastebin.com/TUJTJft5

I asked the developer who created the launcher, and he replied that it's an issue with substance and java 9. I'm quite inexperienced to programming. But I do want to get it work. Please let me know anything could possibly resolve this issue thanks!!!

Window can't be moved between displays

Running an application with Substance 6.1 LAF, I can't move the windows from one display to an other (I'm using 2 monitors): it happens as would the application only consider the screen where it is displayed. If I remove Substance LAF everything works fine.

I'm using Java 1.6.0_22 on Ubuntu 10.10 64bits.

Make available in maven

In order to use the library from a Maven-managed project the jars and all dependencies should
be available in Maven. Are there plans to make substance available on Maven central?

Can the tree collapsed / expanded icons be changed?

Is there a possibility to change the default collapsed (plus sign) and expanded (minus sign) of a tree? Default Java way of setting the icons in the UIMangager doesn't seem to work:

UIManager.put("Tree.collapsedIcon",  new ImageIcon(...));
UIManager.put("Tree.expandedIcon",  new ImageIcon(...));

Color chooser brightness is inverted

The brightness slider on the provided HSB colorchooser is inverted. The top of the slider is darkest, and the bottom of the slider is brightest. But as you bring the slider up, the generated color gets brighter, and as you bring it down, the generated color gets darker.

Layout issues in ColorPicker UI

In the UI for the ColorPicker, in the panel with the Xoetrope color wheel, one of the text boxes does not have enough height to display the text. (It is the textbox with the hexadecimal color value. May depend on font and Windows display settings. I use the Display setting "Medium 125%".)

There is also a tiny button "reset the color wheel saturation and brightness" that doesn't seem to do anything.

In the panel with RGB sliders, there should probably be a small gap added between the sliders and the text boxes.

Fold laf-plugin and laf-widget into the main codebase

Extracting "common" functionality into two separate projects has not stood the test of time.

It's time to fold everything back into the main codebase. Some widgets from laf-widget will be placed into substance-extras (tab overview dialog and tab pager at the moment).

In addition, there will be no more of automatic discovery and instantiation of Substance plugins. Plugins will have to be explicitly registered by the application code base.

JTable hover problems

Hi Kirill

if the mouse is moved over the table, the current row is highlighted.
At the first glance everything is ok.

I have added logging to the method JTable#paintComponent(Graphics), so that I can see how often the table is redrawn and the corresponding renderers (i have expensive renderers ;( ) are called.

Every time I change to another row, the table is redrawn about 15 times, no matter how many data is in the table.

If I do not use Substance and self-programming the highlight of table rows, the table only drawn once, as expected.
I think this is a bug, I'd be very grateful if you could deal with it.

I can provide two test classes to identify what the problem is.

Best greetings,
Pirol

I am using Substance 6.0

Can't resize

EDIT: Sorry i found the error was in how i used the TextArea not in substance itself.

The Linux sync thing

Hi Kirill :)

There is a known issue for Java on Linux, namely that its video buffers aren't always synced promptly (there is some delay <1 s).

This makes, for example, the smooth scroll bar animations appear choppy sometimes. [Example]

Moving the mouse in the window constantly seems to make the animations smooth again.

I have, at times, been calling Toolkit.getDefaultToolkit().sync() explicitly which causes the buffers to be drawn instantly. However, in the case of the scroll bar animation, I wouldn't know how to do that.

Any thoughts on this? It would be nice to see this fixed for sure.

Trident: ClassCastException in StateTransitionMultiTracker

First posted on: Insubstantial#146

I had this exception. It is not common, but it happens.

java.lang.ClassCastException: java.util.HashMap$Node cannot be cast to java.util.HashMap$TreeNode
    at java.util.HashMap$TreeNode.removeTreeNode(HashMap.java:2021)
    at java.util.HashMap.removeNode(HashMap.java:839)
    at java.util.HashMap.remove(HashMap.java:798)
    at org.pushingpixels.substance.internal.animation.StateTransitionMultiTracker$1.onFocusStateTransition(StateTransitionMultiTracker.java:91)
    at org.pushingpixels.substance.internal.animation.StateTransitionTracker.fireFocusStateTransitionEvent(StateTransitionTracker.java:723)
    at org.pushingpixels.substance.internal.animation.StateTransitionTracker.access$000(StateTransitionTracker.java:55)
    at org.pushingpixels.substance.internal.animation.StateTransitionTracker$2.onTimelineStateChanged(StateTransitionTracker.java:216)
    at org.pushingpixels.trident.Timeline$Chain.onTimelineStateChanged(Timeline.java:214)
    at org.pushingpixels.trident.TimelineEngine$1.run(TimelineEngine.java:591)
    at org.pushingpixels.trident.TimelineEngine$TimelineCallbackThread.run(TimelineEngine.java:242)

It was thrown when I started my application. But I only seen it two times (from thousands of executions). Also, I start seen it with Java 8 and latest Insubstantial version.

Nevertheless, the code on StateTransitionMultiTracker is still the same. I must add I didn't had this issue in a while (original post if from 17 Feb 2016).

EmeraldDusk theme disappeared?

Hi Kirill, has EmeraldDusk disappeared in latest builds or did I do something wrong? It's the theme for my program starter...

All the best,
Stefan

Single API surface for Substance-specific customizations

At the present moment, Substance APIs are scattered across multiple places.

  1. SubstanceLookAndFeel class methods (static)
  2. SubstanceLookAndFeel string constants that are used as UIManager keys
  3. SubstanceLookAndFeel string constants that are used as component client property keys
  4. Implicit scanning of META-INF/substance-plugin.xml to find and instantiate plugins
  5. Implicit scanning of META-INF/lafwidget.properties to find and instantiate widgets

The plan is to unify all the APIs into a single tiered structure, where each tier explicitly specifies what is the scope of the specific API. The proposed tiers are:

  1. Global
  2. Root pane - all views in the specific root pane
  3. Component and children - applies to the component and its immediate children
  4. Component and descendants - applies to the component and all of its child hierarchy

(note that 2 is a special case of 4)

Each tier will expose APIs that are relevant to that tier. This means that there will be some duplication across tiers - such as setting focus kind on component and descendants (4), as well as globally (1).

JProgressBar doesn't render properly off-screen

I've been working on a simple library to render Swing components for use as OpenGL textures via JOGL and using Substance as the Look and Feel for a larger application.

Basically, I'm using JComponent instances of various types and taking snapshots of them via their paint(Graphics) methods.

When I do so with Substance's Graphite Look and Feel (this is the only Substance theme I've tested with) installed as the default, JProgressBar doesn't display it's progress indicator (the bar itself that moves as things...progress), unless I place it in an un-displayed JFrame and call that frame's pack() method. If I don't call pack(), then the indicator works, but shows the wrong value.

Oddly, thereafter, it would seem that the progress indicator won't move again.

This kind of off-screen rendering seems to work just fine for the Metal Look and Feel with no trouble.

I've attached a couple of screenshots, as rendered by JOGL through my library, to show the difference between the failed version and the works only once version.

substance - failed jprogressbar
substance - working jprogressbar

JLabel.setForeground

Can I still do that? It seems I'm gretting gray labels when Substance is enabled even if I say setForeground(Color.WHITE). Not sure if I'm doing anything wrong.

http://tinybrain.de/1007194
http://tinybrain.de/1007200

With Substance:
Screenshot

Without Substance:
Screenshot

BTW, with some twists (and apart of this bug), I got full-screen finally working well with Substance on Linux and Windows now. If anyone is interested: The magic for that is here.

Font Placing On Ubuntu Gnome 17.04

Hi, I'm evaluating Ubuntu Gnome 17.04 for Java-related problems. System tray is one issue. The other is the unusually large fonts, apparently, which screw up some of the design (the vertical tabs):

Screenshot

This is a freshly installed Ubuntu running the Substance-based application.

Is this known? Should I try to upgrade the Substance version I'm using?

Program

Cheers,
Stefan

NPE on StandardBorderPainter.paintBorder

Version of Substance

8.0.0dev , caebd79

Version of Java

1.9

Version of OS

Fedora 26

The issue you're experiencing (expected vs actual, screenshot, stack trace etc)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.pushingpixels.substance.api.painter.border.StandardBorderPainter.paintBorder(StandardBorderPainter.java:98)
at org.pushingpixels.substance.internal.utils.SubstanceImageCreator.getTreeIcon(SubstanceImageCreator.java:1400)
at org.pushingpixels.substance.internal.utils.icon.SubstanceIconFactory$TreeIcon.getIcon(SubstanceIconFactory.java:790)
at org.pushingpixels.substance.internal.utils.icon.SubstanceIconFactory$TreeIcon.paintIcon(SubstanceIconFactory.java:813)
at org.pushingpixels.substance.api.hidpi.HiDpiAwareIcon.paintIcon(HiDpiAwareIcon.java:101)
at java.desktop/javax.swing.plaf.basic.BasicButtonUI.paintIcon(BasicButtonUI.java:358)
at org.jdesktop.swingx.plaf.basic.BasicHyperlinkUI.paint(BasicHyperlinkUI.java:187)
at java.desktop/javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:798)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1075)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JViewport.paint(JViewport.java:737)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at org.jdesktop.swingx.JXPanel.paint(JXPanel.java:383)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JSplitPane.paintChildren(JSplitPane.java:1024)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at com.vlsolutions.swing.docking.SplitContainer.paint(SplitContainer.java:255)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at org.jdesktop.swingx.JXPanel.paint(JXPanel.java:383)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1084)
at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5256)
at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246)
at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1313)
at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5204)
at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5014)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:857)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:840)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:840)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:815)
at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:764)
at java.desktop/javax.swing.RepaintManager.access$1200(RepaintManager.java:69)
at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1880)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90

Disabling ProgressBar (and other) Animations

Can't find anything in the docs about how to disable progress bar animations (specifically, how to prevent the progress bar from animating an interpolation between the old value and the new value after setValue() is called).

Docs state that

AnimationConfigurationManager.getInstance().disallowAnimations(.., ..)

can be used to disable animations on components. But animations persist when doing something like the following:

JButton btnEditColor = new JButton("Color");

AnimationConfigurationManager.getInstance().disallowAnimations(AnimationFacet.ROLLOVER, btnEditColor);
AnimationConfigurationManager.getInstance().disallowAnimations(AnimationFacet.FOCUS, btnEditColor);
AnimationConfigurationManager.getInstance().disallowAnimations(AnimationFacet.FOCUS_LOOP_ANIMATION, btnEditColor);
AnimationConfigurationManager.getInstance().disallowAnimations(AnimationFacet.GHOSTING_BUTTON_PRESS, btnEditColor);
AnimationConfigurationManager.getInstance().disallowAnimations(AnimationFacet.GHOSTING_ICON_ROLLOVER, btnEditColor);
AnimationConfigurationManager.getInstance().disallowAnimations(AnimationFacet.SELECTION, btnEditColor);
AnimationConfigurationManager.getInstance().disallowAnimations(AnimationFacet.PRESS, btnEditColor);

I'm not sure if AnimationConfigurationManager is broken or if I'm just misunderstanding how to use it properly

NullPointerException when switch back dynamically to WindowsLookAndFeel

Hi;
When switch my application L&F dynamically from Metal, Nimbus or Windows to Substance LookAndFeel, it works fine with no problem.
When switch back from Substance LookAndFeel to Metal, Nimbus or Windows , the NullPointerException was occurred with the message :
Failed loading L&F: com.sun.java.swing.plaf.windows.WindowsLookAndFeel

For TEST purpose, i just updated UIManager Defaults to use all skinned Substance LookAndFeel.
Thanks in advance.

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.