本文整理汇总了Java中com.kotcrab.vis.ui.widget.VisScrollPane.setFadeScrollBars方法的典型用法代码示例。如果您正苦于以下问题:Java VisScrollPane.setFadeScrollBars方法的具体用法?Java VisScrollPane.setFadeScrollBars怎么用?Java VisScrollPane.setFadeScrollBars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.kotcrab.vis.ui.widget.VisScrollPane
的用法示例。
在下文中一共展示了VisScrollPane.setFadeScrollBars方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createUI
import com.kotcrab.vis.ui.widget.VisScrollPane; //导入方法依赖的package包/类
@Override
protected void createUI () {
workingCopy = new Variables(scene.variables);
variablesMapView = new StringStringMapView("No variables set (press enter in field\nto create variable)", null);
variablesMapView.setMap(workingCopy);
VisScrollPane scrollPane = new VisScrollPane(variablesMapView);
scrollPane.setOverscroll(false, true);
scrollPane.setScrollingDisabled(true, false);
scrollPane.setFadeScrollBars(false);
top();
defaults().top();
add(scrollPane).growX();
row();
add().grow();
row();
add(getButtonTable()).growX();
padBottom(5);
}
示例2: DeleteMultipleFilesTab
import com.kotcrab.vis.ui.widget.VisScrollPane; //导入方法依赖的package包/类
public DeleteMultipleFilesTab (ModuleInjector injector, Array<FileItem> items) {
super(false, true);
this.injector = injector;
this.items = items;
injector.injectModules(this);
table = new VisTable();
table.setBackground(VisUI.getSkin().getDrawable("window-bg"));
table.defaults().left();
usagesTable = new VisTable(true);
rebuildUsagesTable();
VisScrollPane scrollPane = new VisScrollPane(usagesTable);
scrollPane.setFadeScrollBars(false);
table.add(scrollPane).expandX().fillX().pad(3).row();
table.add().expand().fill().row();
table.addSeparator();
table.add(createButtonPane()).pad(3);
}
示例3: warpScrollPane
import com.kotcrab.vis.ui.widget.VisScrollPane; //导入方法依赖的package包/类
public static VisScrollPane warpScrollPane(Actor widget, float width, float height) {
VisScrollPane scrollPane = new VisScrollPane(widget);
scrollPane.setFlickScroll(false);
scrollPane.setFadeScrollBars(false);
scrollPane.setSize(width, height);
return scrollPane;
}
示例4: init
import com.kotcrab.vis.ui.widget.VisScrollPane; //导入方法依赖的package包/类
@Override
public void init () {
kryo = new Kryo();
kryo.setInstantiatorStrategy(new DefaultInstantiatorStrategy(new StdInstantiatorStrategy()));
kryo.register(Array.class, new ArraySerializer());
FileHandle apiCache = fileAccess.getCacheFolder().child("twitter");
apiCache.mkdirs();
twitterCacheFile = apiCache.child("viseditor.data");
if (twitterCacheFile.exists()) readCache();
containerTable = new VisTable(false);
statusesTable = new VisTable();
statusesTable.left().top();
scrollPane = new VisScrollPane(statusesTable);
scrollPane.setOverscroll(false, true);
scrollPane.setFlickScroll(false);
scrollPane.setFadeScrollBars(false);
scrollPane.setScrollingDisabled(true, false);
containerTable.add("@VisEditor");
containerTable.add().expandX().fillX();
containerTable.add(new LinkLabel("Open in Browser", URL)).row();
containerTable.addSeparator().colspan(3).spaceBottom(4);
containerTable.row();
statusesCell = containerTable.add(new VisLabel("Loading...", Align.center)).colspan(3).expand().fill();
if (twitterCache == null || twitterCache.isOutdated()) {
updateCache();
} else {
Log.debug("Twitter cache is up to date");
buildTwitterTable(twitterCache);
}
}
示例5: TestFlowGroup
import com.kotcrab.vis.ui.widget.VisScrollPane; //导入方法依赖的package包/类
public TestFlowGroup () {
super("flow groups");
TableUtils.setSpacingDefaults(this);
columnDefaults(0).left();
setResizable(true);
addCloseButton();
closeOnEscape();
WidgetGroup group = new VerticalFlowGroup(2);
String lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi luctus magna sit amet tellus egestas tincidunt. " +
"Morbi tempus eleifend dictum. Nunc ex nisl, dignissim eget gravida vel, rutrum a nibh. Fusce congue odio ac elit " +
"rhoncus rutrum. Donec nec lectus leo. Phasellus et consectetur ante. Cras vel consectetur mauris, sed semper lectus. ";
String[] parts = lorem.split(" ");
for (String part : parts) {
group.addActor(new VisLabel(part));
}
// group.addActor(new VisLabel("Lorem ipsum"));
// group.addActor(new VisLabel("dolor sit"));
// group.addActor(new VisLabel("amet"));
// group.addActor(new VisLabel("a\nb\nc"));
// group.addActor(new VisLabel("Lorem ipsum"));
// group.addActor(new VisLabel("dolor sit"));
// group.addActor(new VisLabel("amet"));
// group.addActor(new VisLabel("a\nb\nc"));
// group.addActor(new VisLabel("Lorem ipsum"));
// group.addActor(new VisLabel("dolor sit"));
// group.addActor(new VisLabel("amet"));
// group.addActor(new VisLabel("a\nb\nc"));
VisScrollPane scrollPane = new VisScrollPane(group);
scrollPane.setFadeScrollBars(false);
scrollPane.setFlickScroll(false);
scrollPane.setOverscroll(false, false);
scrollPane.setScrollingDisabled(group instanceof HorizontalFlowGroup, group instanceof VerticalFlowGroup);
add(scrollPane).grow();
setSize(300, 150);
centerWindow();
}
示例6: LoadingAssetsFailedDialog
import com.kotcrab.vis.ui.widget.VisScrollPane; //导入方法依赖的package包/类
public LoadingAssetsFailedDialog (ImmutableArray<FailedAssetDescriptor> descriptors) {
super("Failed Assets Details");
TableUtils.setSpacingDefaults(this);
addCloseButton();
closeOnEscape();
setModal(true);
VisTable list = new VisTable(true);
list.defaults().top();
list.top().left();
Array<VisAssetDescriptor> addedDescriptors = new Array<>();
for (FailedAssetDescriptor desc : descriptors) {
boolean alreadyAdded = false;
for (VisAssetDescriptor addedDesc : addedDescriptors) {
if (addedDesc.compare(desc.asset)) {
alreadyAdded = true;
break;
}
}
if (alreadyAdded) continue;
addedDescriptors.add(desc.asset);
VisTextButton detailsButton = new VisTextButton("Details");
detailsButton.addListener(new VisChangeListener((event, actor) -> getStage().addActor(new DetailsDialog(desc.throwable).fadeIn())));
list.add(desc.asset.toString()).left().expandX().fillX();
list.add(detailsButton).padRight(5);
list.row();
}
add("Following assets couldn't be loaded:").left().row();
VisScrollPane scrollPane = new VisScrollPane(list);
scrollPane.setOverscroll(false, true);
scrollPane.setFadeScrollBars(false);
add(scrollPane).top().size(500, 300);
pack();
centerWindow();
}
示例7: SceneOutline
import com.kotcrab.vis.ui.widget.VisScrollPane; //导入方法依赖的package包/类
public SceneOutline (SceneModuleContainer sceneMC) {
super(true);
sceneMC.injectModules(this);
scene = sceneMC.getScene();
proxyCache.addListener(this);
tree = new VisTree();
tree.getSelection().setMultiple(true);
tree.getSelection().setRequired(false);
tree.getSelection().setProgrammaticChangeEvents(false);
tree.addListener(new ClickListener() {
Node selection;
@Override
public void clicked (InputEvent event, float x, float y) {
//tree will deselect item after double click so we on first click store selection
if (getTapCount() == 1 && tree.getSelection().size() == 1) {
selection = tree.getSelection().getLastSelected();
}
if (getTapCount() == 2 && selection != null) {
if (selection instanceof ProxyNode) {
sceneMC.getSceneTab().centerAround(((ProxyNode) selection).proxy);
}
if (selection instanceof GroupNode) {
GroupNode groupNode = (GroupNode) selection;
sceneMC.getSceneTab().centerAroundGroup(groupNode.layerId, groupNode.groupId);
}
selection = null;
}
}
});
setBackground(VisUI.getSkin().getDrawable("window-bg"));
setTouchable(Touchable.enabled);
add(new VisLabel("Outline", Align.center)).expandX().fillX().top().spaceBottom(0).row();
VisScrollPane scrollPane = new VisScrollPane(tree);
scrollPane.setFadeScrollBars(false);
add(scrollPane).expand().fill();
pack();
rebuildOutline(); //do first update
}
示例8: LayersDialog
import com.kotcrab.vis.ui.widget.VisScrollPane; //导入方法依赖的package包/类
public LayersDialog (SceneTab sceneTab, SceneModuleContainer sceneMC) {
super(true);
this.sceneTab = sceneTab;
this.scene = sceneTab.getScene();
sceneMC.injectModules(this);
setBackground(VisUI.getSkin().getDrawable("window-bg"));
setTouchable(Touchable.enabled);
VisImageButton layerAddButton = new VisImageButton(Icons.LAYER_ADD.drawable(), "Add new layer");
layerUpButton = new VisImageButton(Icons.LAYER_UP.drawable(), "Move layer up");
layerDownButton = new VisImageButton(Icons.LAYER_DOWN.drawable(), "Move layer down");
layerSettingsButton = new VisImageButton(Icons.SETTINGS.drawable(), "Show layer settings");
layerRemoveButton = new VisImageButton(Icons.LAYER_REMOVE.drawable(), "Delete layer");
layerUpButton.setGenerateDisabledImage(true);
layerDownButton.setGenerateDisabledImage(true);
layerRemoveButton.setGenerateDisabledImage(true);
layerAddButton.addListener(new VisChangeListener((event, actor) ->
Dialogs.showInputDialog(getStage(), "New Layer", "Name:", true,
input -> scene.getLayerByName(input) == null,
(DefaultInputDialogListener) input -> undoModule.execute(new LayerAddedAction(input)))));
layerUpButton.addListener(new VisChangeListener((event, actor) -> undoModule.execute(new LayerMovedAction(true))));
layerDownButton.addListener(new VisChangeListener((event, actor) -> undoModule.execute(new LayerMovedAction(false))));
layerSettingsButton.addListener(new VisChangeListener((event1, actor1) -> getStage().addActor(new LayerSettingsDialog(sceneMC, scene).fadeIn())));
layerRemoveButton.addListener(new VisChangeListener((event, actor) ->
Dialogs.showOptionDialog(getStage(), "Delete Layer", "Are you sure you want to delete layer '" + scene.getActiveLayer().name + "'?",
OptionDialogType.YES_NO, new OptionDialogAdapter() {
@Override
public void yes () {
UndoableActionGroup layerRemovedGroup = new UndoableActionGroup("Delete Layer");
layerRemovedGroup.add(new EntitiesRemovedAction(sceneMC, sceneTab.getEntityEngine(),
VisBagUtils.toSet(layerManipulator.getEntitiesWithLayer(scene.getActiveLayerId()))));
layerRemovedGroup.add(new LayerRemovedAction(scene.getActiveLayer()));
layerRemovedGroup.finalizeGroup();
undoModule.execute(layerRemovedGroup);
}
})));
layersTable = new VisTable();
VisScrollPane layersScrollPane = new VisScrollPane(layersTable);
layersScrollPane.setScrollingDisabled(true, false);
layersScrollPane.setFadeScrollBars(false);
top();
left();
defaults().left();
defaults().padLeft(5).padRight(5);
add(new VisLabel("Layers")).center().row();
add(layersScrollPane).expandX().fillX().row();
addSeparator();
add(TableBuilder.build(layerAddButton, layerUpButton, layerDownButton, layerSettingsButton, layerRemoveButton)).padBottom(8);
rebuildLayersTable();
sceneObservable = nid -> {
if (nid == EditorScene.LAYER_ADDED || nid == EditorScene.LAYER_INSERTED || nid == EditorScene.LAYER_REMOVED
|| nid == EditorScene.LAYERS_SORTED || nid == EditorScene.ACTIVE_LAYER_CHANGED || nid == EditorScene.LAYER_DATA_CHANGED) {
rebuildLayersTable();
sceneTab.dirty();
}
};
scene.addObservable(sceneObservable);
}