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()final ApiPropertiesgetApiProperties()final UtilitiesgetUtilities()final ServerPackConfigTabgetServerPackConfigTab()final Optional<CommentedConfig>getPluginConfig()final UnitsetPluginConfig(Optional<CommentedConfig> value)final StringgetExtensionName()final StringgetPluginID()final KotlinLoggergetLog()final LoggergetPluginsLog()final ArrayList<CommentedConfig>getServerPackExtensionConfig()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()Clear the interface, or in other words, reset this extensions config panel UI. -
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)
- Parameters:
versionMeta- Instance of VersionMeta so you can work with available Minecraft, Forge, Fabric, LegacyFabric and Quilt versions.apiProperties- Instance of Properties The current configuration of ServerPackCreator, like the default list of clientside-only mods, the server pack directory etc.utilities- Instance of Utilities commonly used across ServerPackCreator.serverPackConfigTab- Instance of ServerPackConfigTab to give you access to the various fields inside it, like the modpack directory, selected Minecraft, modloader and modloader versions, etc.pluginConfig- Plugin specific configuration conveniently provided by ServerPackCreator.extensionName- The name the titled border of this ConfigPanel will get.pluginID- The ID of the plugin providing this extension implementation.
-
-
Method Detail
-
getVersionMeta
final VersionMeta getVersionMeta()
-
getApiProperties
final ApiProperties getApiProperties()
-
getUtilities
final Utilities getUtilities()
-
getServerPackConfigTab
final ServerPackConfigTab getServerPackConfigTab()
-
getPluginConfig
final Optional<CommentedConfig> getPluginConfig()
-
setPluginConfig
final Unit setPluginConfig(Optional<CommentedConfig> value)
-
getExtensionName
final String getExtensionName()
-
getPluginID
final String getPluginID()
-
getLog
final KotlinLogger getLog()
-
getPluginsLog
final Logger getPluginsLog()
-
getServerPackExtensionConfig
final ArrayList<CommentedConfig> getServerPackExtensionConfig()
-
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:
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.
- Parameters:
serverPackExtensionConfig- The list of extension configurations to pass to the configuration panel.
-
clear
abstract Unit clear()
Clear the interface, or in other words, reset this extensions config panel UI. If your Config Panel Extensions has no elements you wish to reset, then simply overwrite this method with an empty method body.
The
clear()-method is called when the owningTabCreateServerPack.clearInterface()-method is called.
-
-
-
-