Coder Social home page Coder Social logo

Comments (4)

kirill-grouchnikov avatar kirill-grouchnikov commented on September 22, 2024

It's not clear what this is fixing. There is #66 which is tracking an enhancement to provide more generic way of rendering such content while still maintaining the animated highlights.

from substance.

raikikon avatar raikikon commented on September 22, 2024
Caused by: java.lang.ClassCastException: org.pushingpixels.substance.api.renderers.SubstanceDefaultTreeCellRenderer cannot be cast to javax.swing.tree.DefaultTreeCellRenderer
	at gis.filter.CheckTreeManager.<init>(CheckTreeManager.java:58)
	at gis.filter.IfPanel.postInit(IfPanel.java:50)
	at gis.filter.IfPanel.<init>(IfPanel.java:31)
	at gis.filter.EntityFilterDialog.<init>(EntityFilterDialog.java:36)
	at gis.filter.SpotLightFiltersManager$SpotLightCustomFilteringDialog.<init>(SpotLightFiltersManager.java:91)
	at com.bel.crl.gis.filter.SpotLightFiltersManager.<clinit>(SpotLightFiltersManager.java:40)

while checkTreemanager code is

public CheckTreeManager(FilterTree tree, IFilterHelper<?>... filterHelper){
		this.tree = tree;
		this.filterHelper = filterHelper;
		EditTreeCell cellEditor = new EditTreeCell(tree, (DefaultTreeCellRenderer) tree.getCellRenderer()); // error here

now EditTreeCell

public class EditTreeCell extends DefaultTreeCellEditor{

    private final int mHotSpot = new JCheckBox().getWidth();

    public EditTreeCell(JTree tree, DefaultTreeCellRenderer renderer) {
        super(tree, renderer);
    }

    @SuppressWarnings("serial")
    @Override
    protected TreeCellEditor createTreeCellEditor() {
    	
        Border              aBorder = UIManager.getBorder("Tree.editorBorder");
		DefaultCellEditor   editor = new DefaultCellEditor (  new DefaultTextField(aBorder)) {
            @Override
            public boolean shouldSelectCell(EventObject event) {
                boolean retValue = super.shouldSelectCell(event);
                return retValue;
            }
        };

        // One click to edit.
        editor.setClickCountToStart(2);
        return editor;
    }

    @Override
    protected boolean inHitRegion(int x, int y) {
        return super.inHitRegion(x+mHotSpot, y);
    }

}

also can you give me http://today.java.net/today/2007/02/22/flexi-slider-src.zip
flexi-slider-src.zip this code

from substance.

kirill-grouchnikov avatar kirill-grouchnikov commented on September 22, 2024

(DefaultTreeCellRenderer) tree.getCellRenderer()

This is not an assumption that a library can make. If you do not have access to change the source code of that library, you will need to change your app to use an extension of DefaultTreeCellRenderer. I've added a comment in SubstanceDefaultTreeCellRenderer explaining why it is not going to be switched to that super class.

from substance.

kirill-grouchnikov avatar kirill-grouchnikov commented on September 22, 2024

As for the flexislider, I don't have the original sources any more. However, some variant of it (don't know if this was the last one I've touched) is in http://www.java2s.com/Code/Jar/f/Downloadflamingo31sourcesjar.htm

Download that and you will have it in the flamingo/slider folder. Use together with https://web.archive.org/web/20080430123725/http://today.java.net/pub/a/today/2007/02/22/how-to-write-custom-swing-component.html. Fair warning - I haven't looked at that code in ten years, so probably I won't be able to answer questions on it.

from substance.

Related Issues (20)

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.