Java Code Examples for com.kotcrab.vis.ui.VisUI#getSizes()

The following examples show how to use com.kotcrab.vis.ui.VisUI#getSizes() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BasicColorPicker.java    From vis-ui with Apache License 2.0 6 votes vote down vote up
protected BasicColorPicker (ColorPickerWidgetStyle style, ColorPickerListener listener, boolean loadExtendedShaders) {
	this.listener = listener;
	this.style = style;
	this.sizes = VisUI.getSizes();

	oldColor = new Color(Color.BLACK);
	color = new Color(Color.BLACK);

	commons = new PickerCommons(style, sizes, loadExtendedShaders);

	createColorWidgets();
	createUI();

	updateValuesFromCurrentColor();
	updateUI();
}
 
Example 2
Source File: TableUtils.java    From vis-ui with Apache License 2.0 5 votes vote down vote up
/** Sets default table spacing for VisUI skin. Uses values from current skin {@link Sizes} class obtained from {@link VisUI#getSizes()}. */
public static void setSpacingDefaults (Table table) {
	Sizes sizes = VisUI.getSizes();
	if (sizes.spacingTop != 0) table.defaults().spaceTop(sizes.spacingTop);
	if (sizes.spacingBottom != 0) table.defaults().spaceBottom(sizes.spacingBottom);
	if (sizes.spacingRight != 0) table.defaults().spaceRight(sizes.spacingRight);
	if (sizes.spacingLeft != 0) table.defaults().spaceLeft(sizes.spacingLeft);
}
 
Example 3
Source File: FileChooser.java    From vis-ui with Apache License 2.0 5 votes vote down vote up
/**
 * @param styleName skin style name
 * @param title chooser window title
 * @param mode whether this chooser will be used to open or save files
 */
public FileChooser (String styleName, String title, Mode mode) {
	super(title);
	this.mode = mode;

	style = VisUI.getSkin().get(styleName, FileChooserStyle.class);
	sizes = VisUI.getSizes();

	init(null);
}
 
Example 4
Source File: PopupMenu.java    From vis-ui with Apache License 2.0 4 votes vote down vote up
public PopupMenu (PopupMenuStyle style) {
	this(VisUI.getSizes(), style);
}
 
Example 5
Source File: TabbedPane.java    From vis-ui with Apache License 2.0 4 votes vote down vote up
public TabbedPane (TabbedPaneStyle style) {
	this(style, VisUI.getSizes());
}
 
Example 6
Source File: Spinner.java    From vis-ui with Apache License 2.0 4 votes vote down vote up
public Spinner (String styleName, String name, SpinnerModel model) {
	this(VisUI.getSkin().get(styleName, SpinnerStyle.class), VisUI.getSizes(), name, model);
}
 
Example 7
Source File: ButtonBar.java    From vis-ui with Apache License 2.0 4 votes vote down vote up
public ButtonBar () {
	this(VisUI.getSizes(), getDefaultOrder());
}
 
Example 8
Source File: ButtonBar.java    From vis-ui with Apache License 2.0 4 votes vote down vote up
public ButtonBar (String order) {
	this(VisUI.getSizes(), order);
}
 
Example 9
Source File: FileChooser.java    From vis-ui with Apache License 2.0 3 votes vote down vote up
/**
 * @param directory starting chooser directory
 * @param mode whether this chooser will be used to open or save files
 */
public FileChooser (FileHandle directory, Mode mode) {
	super("");

	this.mode = mode;

	getTitleLabel().setText(TITLE_CHOOSE_FILES.get());

	style = VisUI.getSkin().get(FileChooserStyle.class);
	sizes = VisUI.getSizes();

	init(directory);
}