Giter VIP home page Giter VIP logo

radiance's People

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

radiance's Issues

[Flamingo] Switch to only support Substance

  • Fold Substance-Flamingo plugin into the core Flamingo sub-project
  • Remove all code that tries to render Flamingo components under other look-and-feels
  • Mark Flamingo to depend on Substance directly
  • Remove the need to explicitly register the plugin
  • Revisit the parallel resizable icon interfaces (in Substance and Flamingo)
  • Remove Flamingo's copy of UiUtil

[Substance] Remove SwingX plugin

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.

LookAndFeel.getDefaults() performance issue

Version of Radiance

69f9224c0e628d46f56d45b7e442f35f93be2230

Sub-project (Trident, Substance, Flamingo, ...)

Substance

Version of Java

Any

Version of OS

Any

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

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

[Flamingo] new component request : GroupableTableHeader

 * +-----------------------------------------------------+
 * |        |       Name      |         Language         |
 * |        |-----------------|--------------------------|
 * |  SNo.  |        |        |        |      Others     |
 * |        |   1    |    2   | Native |-----------------|
 * |        |        |        |        |   2    |   3    |
 * |-----------------------------------------------------|
 * |        |        |        |        |        |        |

like this by Nobuo Tamemasa

[Flamingo] Add text separator to JCommandPopupMenu

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

[Substance] Writing Japanese text fails when using Substance

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.

[Substance] Memory leak in RootPaneDefaultButtonTracker

Version of Radiance

current

Sub-project (Trident, Substance, Flamingo, ...)

Trident/Substance

Version of Java

any

Version of OS

any

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

The memory leak reported here is real.

It happens because RootPaneDefaultButtonTracker.timeline.mainObject is also the JButton.

Screenshot.

[Radiance] Consolidate everything related to scaling into a separate sub-project

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:

  • Resizable icon functionality (IsResizable, ResizableIcon)
  • Hi-DPI aware icons and images (IsHiDpiAware, GlobalScope.getBlankImage)
  • Desktop-consistent text rendering (RenderingUtils)

This sub-project will then become a dependency for Ibis (which will no longer depend on Flamingo), Substance and Flamingo.

[Substance] JTabbedPane titles cut off when vertical

Version of Radiance

1.0.00-dev

Sub-project (Trident, Substance, Flamingo, ...)

Substance

Version of Java

8

Version of OS

Fedora 26

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

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);
    }
}

[Radiance] Sonatype JAR for Hibiscus created with Java 9 classfile version

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

[Substance] Maximize bug on secondary screen when screen resolutions differ

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.

[Substance] 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 its resizing state until manually set back to the normal cursor.
Happens more frequently on OSX than on Windows but does occur on both.

[Substance] Choppy Frame Resizing

Version of Radiance

1.0.00-dev

Sub-project (Trident, Substance, Flamingo, ...)

Substance

Version of Java

OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)

Version of OS

Fedora, 4.16.7-300.fc28.x86_64

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

Frame resizing is not smooth even on a blank application, see: https://gfycat.com/BlissfulHardArrowworm

[Demo] TablePanel demo missing some initialization

Version of Radiance

0.0 ? (Current Substance)

Sub-project (Trident, Substance, Flamingo, ...)

Substance-Demo

Version of Java

any

Version of OS

any

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

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());

[Component] Visual issues under fractional scaling / DPI setting

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):
radiance_substance_dpi150_jre10

Java 8 with a custom DPI setting of 150% (Windows; Radiance Substance 0.9):
radiance_substance_dpi150_jre8

Apparently an infinite drawing loop

Version of Radiance

Latest version when it was still called Substance

Sub-project (Trident, Substance, Flamingo, ...)

Substance

Version of Java

JDK 10.0.1

Version of OS

Peppermint Linux 64

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

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 EDT violation

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?

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.