Class ExtensionConfigPanel
-
- All Implemented Interfaces:
-
java.awt.MenuContainer,java.awt.image.ImageObserver,java.io.Serializable,javax.accessibility.Accessible,javax.swing.TransferHandler.HasGetTransferHandler
public abstract class ExtensionConfigPanel extends JPanel
Template ConfigPanel for use in {@link ConfigPanelExtension} extensions.
Griefed
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ExtensionConfigPanel(VersionMeta versionMeta, ApiProperties apiProperties, Utilities utilities, ServerPackConfigTab serverPackConfigTab, Optional<CommentedConfig> pluginConfig, String extensionName, String pluginID)
-
Method Summary
Modifier and Type Method Description final VersionMetagetVersionMeta()Instance of VersionMeta so you can work with available Minecraft, Forge, Fabric, LegacyFabric and Quilt versions. final ApiPropertiesgetApiProperties()Instance of Properties The current configuration of ServerPackCreator, like the default list of clientside-only mods, the server pack directory etc. final UtilitiesgetUtilities()Instance of Utilities commonly used across ServerPackCreator. final ServerPackConfigTabgetServerPackConfigTab()Instance of ServerPackConfigTab to give you access to the various fields inside it, like the modpack directory, selected Minecraft, modloader and modloader versions, etc. final Optional<CommentedConfig>getPluginConfig()Plugin specific configuration conveniently provided by ServerPackCreator. final UnitsetPluginConfig(Optional<CommentedConfig> value)Plugin specific configuration conveniently provided by ServerPackCreator. final StringgetExtensionName()The name the titled border of this ConfigPanel will get. final StringgetPluginID()The ID of the plugin providing this extension implementation. final KotlinLoggergetLog()final LoggergetPluginsLog()final ArrayList<CommentedConfig>getServerPackExtensionConfig()The panel's current configuration, which SPC stores under the plugin's id in the pack config. abstract ArrayList<CommentedConfig>serverPackExtensionConfig()Retrieve this extensions' server pack specific configuration. abstract UnitsetServerPackExtensionConfig(ArrayList<CommentedConfig> serverPackExtensionConfig)Pass the extension configuration to the configuration panel, so it can then, in turn, load the available configurations and make them editable, if so desired. abstract Unitclear()Resets this panel's inputs to their defaults. -
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, adjustListeningChildrenOnParent, applyComponentOrientation, applyCompoundShape, applyCurrentShape, areBoundsValid, areFocusTraversalKeysSet, areInputMethodsEnabled, autoProcessMouseWheel, bounds, canBeFocusOwner, canBeFocusOwnerRecursively, checkGD, checkImage, checkImage, checkTreeLock, clearCurrentFocusCycleRootOnHide, clearMostRecentFocusOwnerOnHide, coalesceEvents, constructComponentName, contains, contains, containsFocus, countHierarchyMembers, createBufferStrategy, createBufferStrategy, createHierarchyEvents, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, dispatchMouseWheelToAncestor, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, eventTypeEnabled, findUnderMouseInWindow, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessControlContext, getAccessibleIndexInParent, getAccessibleStateSet, getBackBuffer, getBackground, getBaseline, getBounds, getBounds, getBoundsOp, getBufferStrategy, getColorModel, getComponentAt, getComponentAt, getComponentFactory, getComponentListeners, getComponentOrientation, getContainer, getContainingWindow, getCursor, getCursor_NoClientCode, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFocusTraversalKeys_NoIDCheck, getFont, getFontMetrics, getFont_NoClientCode, getForeground, getGraphicsConfiguration, getGraphicsConfiguration_NoClientCode, getGraphics_NoClientCode, getHWPeerAboveMe, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getLocationOnScreen_NoTreeLock, getLocationOnWindow, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getNativeContainer, getNextFocusCandidate, getNormalShape, getObjectLock, getParent, getParent_NoClientCode, getPropertyChangeListeners, getSiblingIndexAbove, getSiblingIndexBelow, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, gotFocus, handleEvent, hasFocus, hide, initializeFocusTraversalKeys, inside, invalidate, invalidateIfValid, invalidateParent, isAutoFocusTransferOnDisposal, isBackgroundSet, isCoalescingEnabled, isCursorSet, isDisplayable, isEnabled, isEnabledImpl, isFocusOwner, isFocusTraversable, isFocusTraversableOverridden, isFocusable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isMixingNeeded, isNonOpaqueForMixing, isPreferredSizeSet, isRecursivelyVisible, isSameOrAncestorOf, isShowing, isValid, isVisible, isVisible_NoClientCode, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mixOnHiding, mixOnReshaping, mixOnShowing, mixOnValidating, mixOnZOrderChanging, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, numListening, paint, paintAll, paintHeavyweightComponents, paramString, pointRelativeToComponent, postsOldMouseEvents, preferredSize, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, relocateComponent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusHelper, requestFocusHelper, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, revalidateSynchronously, setAutoFocusTransferOnDisposal, setBounds, setBoundsOp, setComponentOrientation, setCursor, setDropTarget, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFocusTraversalKeys_NoIDCheck, setFocusable, setGraphicsConfiguration, setIgnoreRepaint, setLocale, setLocation, setMixingCutoutShape, setName, setSize, show, show, size, subtractAndApplyShape, subtractAndApplyShapeBelowMe, transferFocus, transferFocus, transferFocusBackward, transferFocusBackward, transferFocusUpCycle, update, updateChildGraphicsData, updateCursorImmediately, updateGraphicsData, updateZOrder, validate -
Methods inherited from class javax.swing.JComponent
_paintImmediately, addAncestorListener, addVetoableChangeListener, alwaysOnTop, checkIfChildObscuredBySibling, clientPropertyChanged, compWriteObjectNotify, componentInputMapChanged, computeVisibleRect, createToolTip, dndDone, dropLocationForPoint, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaselineResizeBehavior, getBorder, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getCreatedDoubleBuffer, getDebugGraphicsOptions, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputVerifier, getInsets, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPainting, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintForceDoubleBuffered, paintImmediately, paintImmediately, paintToOffscreen, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyBindings, putClientProperty, rectangleIsObscured, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setCreatedDoubleBuffer, setDebugGraphicsOptions, setDoubleBuffered, setDropLocation, setEnabled, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setUIProperty, setVerifyInputWhenFocusTarget, setVisible, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, updateUI -
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, adjustDescendants, adjustDescendantsOnParent, adjustListeningChildren, canContainFocusOwner, countComponents, createChildHierarchyEvents, decreaseComponentCount, dispatchEventToSelf, findComponentAt, findComponentAt, findComponentAt, findComponentAtImpl, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getComponent, getComponentCount, getComponentZOrder, getComponents, getComponentsSync, getComponents_NoClientCode, getContainerListeners, getDropTargetEventTarget, getFocusTraversalPolicy, getHeavyweightContainer, getLayout, getMouseEventTarget, getMousePosition, getOpaqueShape, getTraversalRoot, hasHeavyweightDescendants, hasLightweightDescendants, increaseComponentCount, insets, invalidateTree, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isRecursivelyVisibleUpToHeavyweightContainer, paintComponents, postProcessKeyEvent, preProcessKeyEvent, printComponents, processContainerEvent, proxyEnableEvents, recursiveApplyCurrentShape, recursiveApplyCurrentShape, recursiveApplyCurrentShape, recursiveSubtractAndApplyShape, recursiveSubtractAndApplyShape, recursiveSubtractAndApplyShape, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateTree, validateUnconditionally -
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI -
Methods inherited from class java.awt.MenuContainer
postEvent, remove -
Methods inherited from class java.awt.image.ImageObserver
imageUpdate -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ExtensionConfigPanel
ExtensionConfigPanel(VersionMeta versionMeta, ApiProperties apiProperties, Utilities utilities, ServerPackConfigTab serverPackConfigTab, Optional<CommentedConfig> pluginConfig, String extensionName, String pluginID)
-
-
Method Detail
-
getVersionMeta
final VersionMeta getVersionMeta()
Instance of VersionMeta so you can work with available Minecraft, Forge, Fabric, LegacyFabric and Quilt versions.
-
getApiProperties
final ApiProperties getApiProperties()
Instance of Properties The current configuration of ServerPackCreator, like the default list of clientside-only mods, the server pack directory etc.
-
getUtilities
final Utilities getUtilities()
Instance of Utilities commonly used across ServerPackCreator.
-
getServerPackConfigTab
final ServerPackConfigTab getServerPackConfigTab()
Instance of ServerPackConfigTab to give you access to the various fields inside it, like the modpack directory, selected Minecraft, modloader and modloader versions, etc.
-
getPluginConfig
final Optional<CommentedConfig> getPluginConfig()
Plugin specific configuration conveniently provided by ServerPackCreator. This is the global configuration of the plugin which provides the ConfigPanelExtension to ServerPackCreator.
-
setPluginConfig
final Unit setPluginConfig(Optional<CommentedConfig> value)
Plugin specific configuration conveniently provided by ServerPackCreator. This is the global configuration of the plugin which provides the ConfigPanelExtension to ServerPackCreator.
-
getExtensionName
final String getExtensionName()
The name the titled border of this ConfigPanel will get.
-
getPluginID
final String getPluginID()
The ID of the plugin providing this extension implementation. The pluginID determines which extension specific configurations are provided to this panel, and how they are stored in a given serverpackcreator.conf.
-
getLog
final KotlinLogger getLog()
-
getPluginsLog
final Logger getPluginsLog()
-
getServerPackExtensionConfig
final ArrayList<CommentedConfig> getServerPackExtensionConfig()
The panel's current configuration, which SPC stores under the plugin's id in the pack config.
-
serverPackExtensionConfig
abstract ArrayList<CommentedConfig> serverPackExtensionConfig()
Retrieve this extensions' server pack specific configuration. When no configuration with configs for this extension has been loaded yet, the returned list is empty. Fill it with life!
Returns the config list to be used in subsequent server pack generation runs, by various other extensions.
-
setServerPackExtensionConfig
abstract Unit setServerPackExtensionConfig(ArrayList<CommentedConfig> serverPackExtensionConfig)
Pass the extension configuration to the configuration panel, so it can then, in turn, load the available configurations and make them editable, if so desired.
-
clear
abstract Unit clear()
Resets this panel's inputs to their defaults. Give it an empty body when the panel has nothing to reset.
No host calls this today. The GUI reaches a panel through
ApiPlugins.getConfigPanelsand drives it only via serverPackExtensionConfig and setServerPackExtensionConfig. Implement it regardless: it is abstract, so a host may begin calling it without the API changing shape.
-
-
-
-