kirill-grouchnikov / radiance Goto Github PK
View Code? Open in Web Editor NEWBuilding modern, elegant and fast Swing applications
License: BSD 3-Clause "New" or "Revised" License
Building modern, elegant and fast Swing applications
License: BSD 3-Clause "New" or "Revised" License
What went wrong:
A problem occurred evaluating root project 'hibiscus-demo'.java.lang.UnsupportedClassVersionError: org/pushingpixels/hibiscus/HibiscusPlugin has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Need to check which version of Java is used to compile jars locally before uploading to the staging Sonatype repository
Flatten the lines and the gradients
Application menu button -> rectangle
Application menu -> backstage
This page needs to be updated with the new location of demo projects.
SubstanceDefault*Renderer classes extend the default classes and as such are limited to be extending the JLabel class.
See if Substance can provide an extension of JPanel that has built-in support for highlight animations for JList, JTable and JTree.
Remove the demo apps from substance-demo and move all the "extra" functionality into flamingo-demo now that Flamingo depends on Substance.
Use Rainbow as proof-of-concept and sandbox area for Kormorant.
Also remove usage of JXLayer and modernize the search appearance.
Provide crosshatch as part of the Extras pack for backwards-compatible support.
Otherwise there's a lot of noise going on at the top level of the main Radiance folder.
In addition to offline mode (with command line script invocation), support build-time transcoding of SVG content into a source folder that is not necessarily the same location as the input SVG files.
1.0.00-dev
Substance
8
Fedora 26
This picture demonstrates the issue - the text is being pushed off way too far to the right and doesn't get drawn inside the bounds of the tab's titlebox.
The code used:
final class SideBar extends JToolBar {
private static final long serialVersionUID = -7274637780672751510L;
static final int WIDTH = 200;
private static final Dimension SIZE = new Dimension(WIDTH, 0);
private final JTabbedPane tabbedPane = new JTabbedPane();
void init() {
setFloatable(false);
setPreferredSize(SIZE);
setSize(SIZE);
JPanel panel1 = new JPanel();
panel1.add(new JLabel("one"));
JPanel panel2 = new JPanel();
panel2.add(new JLabel("two"));
tabbedPane.setTabPlacement(JTabbedPane.RIGHT);
tabbedPane.addTab("Title 1", panel1);
tabbedPane.addTab("Title 2", panel2);
add(tabbedPane);
}
}
Like in latest iterations of High Sierra - control buttons are plain flat circles with no icons. Icons fade in when the mouse is over the control button group.
https://github.com/kirill-grouchnikov/onyx
SwingX is a dead weight.
Migrate the main demo app away from SwingX component, and when that is done, remove the entire substance-swingx sub-project.
This one is an old one, but it's still present on latest version.
You need two monitors with different screen sizes. Set the screen size for the secondary monitor bigger than the primary monitor. For example:
Screen 1: 1366x768
Screen 2: 1920x1080
Steps to reproduce:
Run an empty JFrame with Substance L&F, it must be opened by default on Screen 1.
Drag the window to the Screen 2.
Maximize.
Expected: Window having full size on Screen 2.
Actual: Window is correctly positioned on (0,0) but the frame size is equal to Screen 1 size, so it does not cover the full screen.
Tracker for moving from Java 8 to Java 9
Tentatively tracking for 2019.H1 releases - need to see how it goes with Java 10 / 11 releases.
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 its resizing state until manually set back to the normal cursor.
Happens more frequently on OSX than on Windows but does occur on both.
This doesn't play at all with quick access toolbar. All ribbon content should be single-line.
Use FormBuilder instead
I have tested the 0.9 snapshot version of Radiance Substance with high DPI and different Java versions on Windows 7 and 10. Everything seems to work perfectly with Java 8. However, with Java 9 and 10 there seems to be a problem. If a custom DPI setting of more than 100% is used it seems that the margins or insets of the controls are not adjusted in a correct way. Please see the first screenshot below of the Substance Check demo application running on Java 10 with a custom DPI setting of 150%. The same test with Java 8 seems to work fine (second screenshot).
Java 10 with a custom DPI setting of 150% (Windows; Radiance Substance 0.9):
Java 8 with a custom DPI setting of 150% (Windows; Radiance Substance 0.9):
JCommandPopupMenu allows you to add separator which is basically an instance of JSeparator, but in some cases you need to add a text separator to indicate the name of the groups.
I achieve this with this code:
public class JCommandGroupablePopupMenu extends JCommandPopupMenu {
public void startGroup(String name) {
JPanel panel = new JPanel(new BorderLayout());
panel.add(new JXTitledSeparator(name, SwingConstants.HORIZONTAL), BorderLayout.CENTER);
addMenuPanel(panel);
}
public void startGroup(String name, Icon icon) {
JPanel panel = new JPanel(new BorderLayout());
panel.add(new JXTitledSeparator(name, SwingConstants.HORIZONTAL, icon), BorderLayout.CENTER);
addMenuPanel(panel);
}
@Override
public void setMaxVisibleMenuButtons(int maxVisibleMenuButtons) {
//avoid to change maxVisibleMenuButtons
}
}
But due to code restrictions I'm not able to change the number of visible menu buttons. It will be nice to add this kind of support.
Thanks
current
Trident/Substance
any
any
The memory leak reported here is real.
It happens because RootPaneDefaultButtonTracker.timeline.mainObject is also the JButton.
Now that Flamingo is on top of Substance
The vertical up/down/expand button strip does not have correct visuals under RTL
When i use the default system look & feel, and click Browse to select a file i select a file with a Japanese name and its Japanese name appears fine in the JTextField. If i use a Substance look and feel, select the same file, its name appears as blocks in the JTextField.
Latest version when it was still called Substance
Substance
JDK 10.0.1
Peppermint Linux 64
I believe it's an infinite drawing loop in AWT thread. UI not responsive, got thread dump using VisualVM.
"AWT-EventQueue-0" #19 prio=6 os_prio=0 tid=0x00007f38d0581800 nid=0x858 runnable [0x00007f383e7f3000]
java.lang.Thread.State: RUNNABLE
at sun.java2d.marlin.DRenderer.lineTo([email protected]/DRenderer.java:683)
at sun.java2d.marlin.DHelpers$PolyStack.popAll([email protected]/DHelpers.java:650)
at sun.java2d.marlin.DStroker.emitReverse([email protected]/DStroker.java:615)
at sun.java2d.marlin.DStroker.finish([email protected]/DStroker.java:649)
at sun.java2d.marlin.DStroker.moveTo([email protected]/DStroker.java:505)
at sun.java2d.marlin.DStroker.moveTo([email protected]/DStroker.java:481)
at sun.java2d.marlin.DDasher.goTo([email protected]/DDasher.java:270)
at sun.java2d.marlin.DDasher.lineTo([email protected]/DDasher.java:372)
at sun.java2d.marlin.DMarlinRenderingEngine.pathToLoop([email protected]/DMarlinRenderingEngine.java:673)
at sun.java2d.marlin.DMarlinRenderingEngine.pathTo([email protected]/DMarlinRenderingEngine.java:633)
at sun.java2d.marlin.DMarlinRenderingEngine.strokeTo([email protected]/DMarlinRenderingEngine.java:451)
at sun.java2d.marlin.DMarlinRenderingEngine.strokeTo([email protected]/DMarlinRenderingEngine.java:224)
at sun.java2d.marlin.DMarlinRenderingEngine.getAATileGenerator([email protected]/DMarlinRenderingEngine.java:864)
at sun.java2d.pipe.AAShapePipe.renderPath([email protected]/AAShapePipe.java:146)
at sun.java2d.pipe.AAShapePipe.draw([email protected]/AAShapePipe.java:77)
at sun.java2d.pipe.PixelToParallelogramConverter.draw([email protected]/PixelToParallelogramConverter.java:148)
at sun.java2d.pipe.ValidatePipe.draw([email protected]/ValidatePipe.java:154)
at sun.java2d.SunGraphics2D.draw([email protected]/SunGraphics2D.java:2498)
at org.pushingpixels.substance.api.SubstanceConstants$FocusKind$4.paintFocus(SubstanceConstants.java:256)
at org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities.paintFocus(SubstanceCoreUtilities.java:1443)
at org.pushingpixels.substance.internal.ui.SubstanceButtonUI.paint(SubstanceButtonUI.java:399)
at org.pushingpixels.substance.internal.ui.SubstanceButtonUI.update(SubstanceButtonUI.java:545)
at javax.swing.JComponent.paintComponent([email protected]/JComponent.java:797)
at javax.swing.JComponent.paint([email protected]/JComponent.java:1074)
at javax.swing.JComponent.paintChildren([email protected]/JComponent.java:907)
- locked <0x00000000e80f1b78> (a java.awt.Component$AWTTreeLock)
at javax.swing.JComponent.paint([email protected]/JComponent.java:1083)
at javax.swing.JComponent.paintToOffscreen([email protected]/JComponent.java:5255)
at javax.swing.BufferStrategyPaintManager.paint([email protected]/BufferStrategyPaintManager.java:246)
at javax.swing.RepaintManager.paint([email protected]/RepaintManager.java:1313)
at javax.swing.JComponent._paintImmediately([email protected]/JComponent.java:5203)
at javax.swing.JComponent.paintImmediately([email protected]/JComponent.java:5013)
at javax.swing.RepaintManager$4.run([email protected]/RepaintManager.java:857)
at javax.swing.RepaintManager$4.run([email protected]/RepaintManager.java:840)
at java.security.AccessController.doPrivileged([email protected]/Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege([email protected]/ProtectionDomain.java:87)
at javax.swing.RepaintManager.paintDirtyRegions([email protected]/RepaintManager.java:840)
at javax.swing.RepaintManager.paintDirtyRegions([email protected]/RepaintManager.java:815)
at javax.swing.RepaintManager.prePaintDirtyRegions([email protected]/RepaintManager.java:764)
at javax.swing.RepaintManager.access$1200([email protected]/RepaintManager.java:69)
at javax.swing.RepaintManager$ProcessingRunnable.run([email protected]/RepaintManager.java:1880)
at java.awt.event.InvocationEvent.dispatch([email protected]/InvocationEvent.java:313)
at java.awt.EventQueue.dispatchEventImpl([email protected]/EventQueue.java:770)
at java.awt.EventQueue.access$600([email protected]/EventQueue.java:97)
at java.awt.EventQueue$4.run([email protected]/EventQueue.java:721)
at java.awt.EventQueue$4.run([email protected]/EventQueue.java:715)
at java.security.AccessController.doPrivileged([email protected]/Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege([email protected]/ProtectionDomain.java:87)
at java.awt.EventQueue.dispatchEvent([email protected]/EventQueue.java:740)
at java.awt.EventDispatchThread.pumpOneEventForFilters([email protected]/EventDispatchThread.java:203)
at java.awt.EventDispatchThread.pumpEventsForFilter([email protected]/EventDispatchThread.java:124)
at java.awt.EventDispatchThread.pumpEventsForHierarchy([email protected]/EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents([email protected]/EventDispatchThread.java:109)
at java.awt.EventDispatchThread.pumpEvents([email protected]/EventDispatchThread.java:101)
at java.awt.EventDispatchThread.run([email protected]/EventDispatchThread.java:90)
SubstanceListUI::repaintCell
seems to be causing a EDT violation:
at ...$1.getListCellRendererComponent(...java:159)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1361)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1311)
at org.pushingpixels.substance.internal.ui.SubstanceListUI.access$2300(SubstanceListUI.java:92)
at org.pushingpixels.substance.internal.ui.SubstanceListUI$CellRepaintCallback.repaintCell(SubstanceListUI.java:440)
at org.pushingpixels.substance.internal.ui.SubstanceListUI$CellRepaintCallback.onTimelineStateChanged(SubstanceListUI.java:419)
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 is randomly causing a weird/impossible NPE in JLabel when the getListCellRendererComponent is using icons:
java.lang.NullPointerException
at javax.swing.JLabel.setIcon(JLabel.java:406)
at ...$1.getListCellRendererComponent(...java:171)
I have a found an old version of SubstanceListUI where the repaintCell is wrapped in a invokeLater call
/**
* Repaints the associated cell.
*/
private void repaintCell() {
// SwingUtilities.invokeLater(new Runnable() {
// public void run() {
if (SubstanceListUI.this.list == null) {
// may happen if the LAF was switched in the meantime
return;
}
try {
maybeUpdateLayoutState();
int cellCount = list.getModel().getSize();
if ((cellCount > 0) && (cellIndex < cellCount)) {
// need to retrieve the cell rectangle since the
// cells can be moved while animating
Rectangle rect = SubstanceListUI.this.getCellBounds(list,
cellIndex, cellIndex);
// System.out.println("Repainting " + cellIndex
// + " at " + rect);
list.repaint(rect);
}
} catch (RuntimeException re) {
return;
}
}
Should the repaintCell
not be wrapped in a invokerLater
to avoid a EDT violation?
Enabling themed-icons mode with SubstanceCortex.GlobalScope.setUseThemedDefaultIcons
ends up with comboboxes that do not show the original icon in full color when the item is in rollover state - unlike buttons and menu items.
There's a bunch of code that is either copy-pasted or almost-identical-but-not-quite across Substance and Flamingo.
As part of #10 the following will be extracted into a new sub-project and exposed as needed as public APIs:
This sub-project will then become a dependency for Ibis (which will no longer depend on Flamingo), Substance and Flamingo.
* +-----------------------------------------------------+ * | | Name | Language | * | |-----------------|--------------------------| * | SNo. | | | | Others | * | | 1 | 2 | Native |-----------------| * | | | | | 2 | 3 | * |-----------------------------------------------------| * | | | | | | |
like this by Nobuo Tamemasa
Otherwise it can't be built after a local sync
Also add the BasicCheckRibbon equivalent to kormorant-demo
The following global configurations should be grouped a single place - demo app status bar:
Move https://github.com/kirill-grouchnikov/lightbeam under the tools/ folder.
Make sure that it doesn't depend on any other library in Radiance and can still measure performance of core and other third-party look-and-feels.
0.0 ? (Current Substance)
Substance-Demo
any
any
org.pushingpixels.demo.substance.main.check.TablePanel code does not initialize the state of the JCheckBox
called toHideOddModelRows
Frankly, I don't remember the exact stack trace, but if the user presses that checkbox before turning on sorting, some sort of exception happens. Fix it by adding just one line:
line 422: builder.append("Sorted", isSorted);
add line 423: toHideOddModelRows.setEnabled(isSorted.isSelected());
Mostly in Substance, but make sure to make a full pass on all the projects
69f9224c0e628d46f56d45b7e442f35f93be2230
Substance
Any
Any
In my project I have tried to upgrade from Insubsnatial to Radiance and hit performance issue. After profiling I have root cause. In my application I'm calling LookAndFeel.getDefaults()
very often (to check if default theme is dark or light). It causes to call org.pushingpixels.substance.internal.utils.SubstanceImageCreator#getCrayonsImage
very often. As result method org.pushingpixels.substance.internal.utils.SubstanceImageCreator#getSingleCrayon
is eating most of CPU cycles.
I'm proposing MR to cache result of getCrayonsImage
. Here is my MR: #42
This is needed for #16
Need to expose the class parameter as a public class / interface
Instead of with BufferedImageOp
1.0.00-dev
Substance
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
Fedora, 4.16.7-300.fc28.x86_64
Frame resizing is not smooth even on a blank application, see: https://gfycat.com/BlissfulHardArrowworm
TILE command buttons with ACTION_AND_POPUP_MAIN_POPUP do not correctly reflect the disabled state of the models. When action model is disabled, the texts are shown as disabled. When the popup model is disabled, the texts are shown as enabled. The behavior should be the opposite.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.