This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.hs.settlers.util; | |
import java.lang.reflect.Field; | |
import javafx.beans.property.Property; | |
import javafx.beans.value.ChangeListener; | |
import javafx.beans.value.ObservableValue; | |
import javafx.collections.ObservableSet; | |
import javafx.collections.SetChangeListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ComponentHolder { | |
// ... | |
public void onEvent(String methodName) { | |
for (Component c:getComponents()) { | |
if (c.getClass().hasMethod(methodName)) { | |
c.getClass().getMethod(methodName).execute(c); | |
} | |
} | |
} | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contianer c = new GenericContainer(); | |
c.setLayout(new VerticalLayout()); | |
c.setGeometry(5,5,width - 10, height - 10); | |
c.attachWidget(addon, new GenericLabel("Title")); //Same as c.getLayout().addItem(new WidgetItem(widget)); | |
c.getLayout().addItem(new SpacerItem(0, 25, 0, Integer.INFINITY)); //minWidth, minHeight, maxWidth, maxHeight | |
Button b = new GenericButton("Done"); | |
b.setMaxWidth(200); | |
c.attachWidget(addon, b); | |
c.getLayout().setAlign(WidgetAnchor.TOP_CENTER); | |
screen.attachWidget(addon, c); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p.addPoint(0, 0, new Color(0xffffffff)); | |
p.addPoint(0, 10, new Color(0xffffffff)); | |
p.addPoint(10, 10, new Color(0xffffffff)); | |
p.addPoint(10, 0, new Color(0xffffffff)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.narrowtux.longjourney; | |
import org.bukkit.Chunk; | |
import org.bukkit.Location; | |
import org.bukkit.event.vehicle.VehicleListener; | |
import org.bukkit.event.vehicle.VehicleMoveEvent; | |
import org.bukkit.util.Vector; | |
public class LJVehicleListener extends VehicleListener { | |
NewerOlder