mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-27 02:40:51 +01:00
highlight internal exts
This commit is contained in:
parent
d612eb8c54
commit
60992d9e38
@ -5,6 +5,7 @@ import gearth.misc.packet_info.PacketInfoManager;
|
|||||||
import gearth.protocol.HMessage;
|
import gearth.protocol.HMessage;
|
||||||
import gearth.protocol.HPacket;
|
import gearth.protocol.HPacket;
|
||||||
import gearth.protocol.connection.HClient;
|
import gearth.protocol.connection.HClient;
|
||||||
|
import gearth.services.extensionhandler.extensions.ExtensionType;
|
||||||
import gearth.services.extensionhandler.extensions.GEarthExtension;
|
import gearth.services.extensionhandler.extensions.GEarthExtension;
|
||||||
|
|
||||||
// wraps internal GEarthExtension class to IExtension interface
|
// wraps internal GEarthExtension class to IExtension interface
|
||||||
@ -136,4 +137,9 @@ public class InternalExtensionBuilder extends GEarthExtension {
|
|||||||
// no need in java ext
|
// no need in java ext
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExtensionType extensionType() {
|
||||||
|
return ExtensionType.INTERNAL;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
package gearth.services.extensionhandler.extensions;
|
||||||
|
|
||||||
|
public enum ExtensionType {
|
||||||
|
INTERNAL,
|
||||||
|
EXTERNAL
|
||||||
|
}
|
@ -123,4 +123,7 @@ public abstract class GEarthExtension {
|
|||||||
}
|
}
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public abstract ExtensionType extensionType();
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package gearth.services.extensionhandler.extensions.implementations.network;
|
|||||||
import gearth.misc.packet_info.PacketInfoManager;
|
import gearth.misc.packet_info.PacketInfoManager;
|
||||||
import gearth.protocol.HMessage;
|
import gearth.protocol.HMessage;
|
||||||
import gearth.protocol.connection.HClient;
|
import gearth.protocol.connection.HClient;
|
||||||
|
import gearth.services.extensionhandler.extensions.ExtensionType;
|
||||||
import gearth.services.extensionhandler.extensions.GEarthExtension;
|
import gearth.services.extensionhandler.extensions.GEarthExtension;
|
||||||
import gearth.protocol.HPacket;
|
import gearth.protocol.HPacket;
|
||||||
|
|
||||||
@ -239,4 +240,9 @@ public class NetworkExtension extends GEarthExtension {
|
|||||||
packet.appendLongString(packetFromString.stringify());
|
packet.appendLongString(packetFromString.stringify());
|
||||||
sendMessage(packet);
|
sendMessage(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExtensionType extensionType() {
|
||||||
|
return ExtensionType.EXTERNAL;
|
||||||
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@ import gearth.misc.packet_info.PacketInfoManager;
|
|||||||
import gearth.protocol.HMessage;
|
import gearth.protocol.HMessage;
|
||||||
import gearth.protocol.HPacket;
|
import gearth.protocol.HPacket;
|
||||||
import gearth.protocol.connection.HClient;
|
import gearth.protocol.connection.HClient;
|
||||||
|
import gearth.services.extensionhandler.extensions.ExtensionType;
|
||||||
import gearth.services.extensionhandler.extensions.GEarthExtension;
|
import gearth.services.extensionhandler.extensions.GEarthExtension;
|
||||||
|
|
||||||
public class ExampleExtension extends GEarthExtension {
|
public class ExampleExtension extends GEarthExtension {
|
||||||
@ -122,4 +123,9 @@ public class ExampleExtension extends GEarthExtension {
|
|||||||
public void stringToPacketResponse(HPacket packet) {
|
public void stringToPacketResponse(HPacket packet) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExtensionType extensionType() {
|
||||||
|
return ExtensionType.INTERNAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package gearth.ui.extensions;
|
package gearth.ui.extensions;
|
||||||
|
|
||||||
|
import gearth.services.extensionhandler.extensions.ExtensionType;
|
||||||
import gearth.services.extensionhandler.extensions.GEarthExtension;
|
import gearth.services.extensionhandler.extensions.GEarthExtension;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
@ -142,6 +143,11 @@ public class ExtensionItemContainer extends GridPane {
|
|||||||
|
|
||||||
parent.getChildren().add(this);
|
parent.getChildren().add(this);
|
||||||
|
|
||||||
|
if (item.extensionType() == ExtensionType.INTERNAL) {
|
||||||
|
setBackground(new Background(new BackgroundFill(Paint.valueOf("F0FFFF"), CornerRadii.EMPTY, Insets.EMPTY)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
initExtension();
|
initExtension();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user