se.europeanspallationsource.xaos.ui.spi.ClassIconProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xaos.ui Show documentation
Show all versions of xaos.ui Show documentation
JavaFX-based portion of the XAOS framework, containing the JavaFX-based
controls and tools suitable for other projects too.
The newest version!
/*
* Copyright 2018 European Spallation Source ERIC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package se.europeanspallationsource.xaos.ui.spi;
import javafx.scene.Node;
/**
* Provides icons (i.e. {@link Node}s) for a given {@link Class} name.
*
* @author [email protected]
*/
public interface ClassIconProvider {
/**
* Return an icon (i.e. a square {@link Node} for the given {@link Class} name.
*
* @param clazz The full class name (the one returned by {@link Class#getName()})
* for which a graphical representation is needed.
* @param size The size of the square {@code Node} to be returned.
* @return An icon as a {@link Node} instance, or {@code null} if {@code clazz}
* is {@code null} or empty, {@code size <= 0}, or no suitable
* representation can be found.
*/
public Node iconFor( String clazz, int size );
}