Skip to content

0.18.0

Compare
Choose a tag to compare
@bjorndarri bjorndarri released this 22 May 10:52
· 1029 commits to main since this release

Changes

is.codion

  • ServiceConfigurationError caught, cause unwrapped and rethrown.

is codion.common.core

  • Text.SpaceAwareCollator bug fixed, now treats null values as an empty string.
  • Nulls utility class added.
  • MessageBundle added, Messages service provides a way to override default localization messages.
  • is.codion.common.resources renamed resource.
  • Value.mapNull() removed, no longer used.
  • Messages renamed Resources. DefaultMessageBundle now throws correct exception in case of a missing resource.
  • Resources.get() renamed getString(), consistent with ResourceBundle.
  • Operator.IN and NOT_IN added.
  • Operator, reordered to group single value operators.
  • State.Group no longer uses weak references for member states.
  • State.Group now enables the previously enabled state when the currently enabled state is disabled, instead of leaving all states disabled.
  • State.Group bug fixed, now enables the next state when the currently enabled state is disabled and a previously active state is not available.
  • Value.addValidator(), removeValidator(), validator type now ? super T.

is codion.common.db

  • Database.databaseException() renamed exception().
  • Database.createConnectionPool() now returns the pool.
  • ResultIterator now implementes Iterable.
  • Database.COUNT_QUERIES configuration value added.

is codion.common.model

  • ColumnSummaryModel.SummaryValues removed, related refactoring.
  • ColumnSummaryModel.SummaryValueProvider renamed SummaryValues, related renaming.
  • FilteredModel.Refresher.itemSupplier() renamed items(), related renaming.
  • FilteredModel renamed FilterModel.
  • ColumnConditionModel.equalValues() replaced with equalValue() and inValues().
  • ColumnConditionModel.Factory.supports() renamed includes().
  • ColumnConditionModel.Factory.includes() removed, createConditionModel() now returns Optional.

is.codion.swing.common.model

  • FilteredComboBoxModel.ItemFinder.createPredicate() renamed predicate().
  • FilteredComboBoxModel.sortVisibleItems() renamed sortItems(), now public.
  • FilteredComboBoxModel.sortVisibleItems() bug fixed, now takes the null item into account.
  • Controls.Builder.defaults(stopAt) now includes the specified stopAt control instead of stopping before it.
  • DialogBuilder, FrameBuilder.titleProvider() renamed title().
  • LookAndFeelProvider.addLookAndFeelProvider() renamed addLookAndFeel().
  • FilteredTableCellRenderer.Builder.columnShadingEnabled() renamed columnShading().
  • FilteredTableModel.Builder.itemValidator() renamed validator(), related renaming.
  • Major surgery, FilteredTableModel.sortModel(), searchModel(), summaryModel() and columnModel() moved to FilteredTable, related refactoring.
  • FilteredTableModel renamed FilterTableModel, related renaming.
  • FilteredComboBoxModel renamed FilterComboBoxModel.
  • FilteredTableModel.ColumnValueProvider renamed ColumnValues, related renaming.
  • FilterComboBoxModel now interface, DefaultFilterComboBoxModel added.

is.codion.swing.common.ui

  • ProgressDialog.Builder, ProgressWorkerDialogBuilder.controls() replaced with control().
  • ProgressDialog bug fixed, no longer adds an empty south panel when no controls are specified.
  • KeyboardShortcut.Shortcut.keyStroke() now returns Optional.
  • Control keyboard shortcut handling refactored.
  • AbstractComponentBuilder bug fixed, now able to set size values to zero, validates size values.
  • FilteredTable.MoveResizeColumnKeyListener bug fixed, now longer triggers when modifiers are added, restricted to the correct keys.
  • FilteredTable, move and resize column controls added, default key stroke now configurable.
  • FilteredTable, key strokes now configurable.
  • FilteredTableCellRenderer.CollColorProvider renamed CellColors.
  • FilteredTableCellRenderer.Builder.displayValueProvider() renamed values().
  • LookAndFeelProvider.CROSS_PLATFORM and SYSTEM configuration values added.
  • Control.copy() added, copying the control with the underlying command.
  • EntityPanel.Config.editPanelState() and editPanelStates() renamed initialEditState() and enabledEditStates() respectively.
  • TabbedDetailLayout.Builder.panelState() and panelStates() renamed initialDetailState() and enabledDetailStates() respectively.
  • FilteredTable renamed FilterTable, related renaming.
  • SearchHighlighter.nextSearchPosition() and previousSearchPosition() now public.
  • SearchHighlighter default colors now based on the selection color of the component.
  • ComponentBuilder.onBuildValue() added, related refactoring.
  • LookAndFeelProvider.defaultLookAndFeelName() overloaded with a defaultLookAndFeel parameter.
  • FilterTable.copyToClipBoard() bug fixed, always exported the whole table instead of the selected rows.
  • ColumnConditionPanel now supports the IN operator.
  • ListBoxBuilder added.
  • ListBoxBuilder.string() added, providing the string values to render in the list.
  • FilterTableCellRenderer.Builder.values() renamed string().
  • AbstractColumnConditionPanel and AbstractFilterTableConditionPanel added, related refactoring.
  • AbstractColumnConditionPanel, AbstractFilterTableConditionPanel.focusGainedEvent() removed.
  • AbstractColumnConditionPanel and AbstractFilterTableConditionPanel replaced with interfaces FilterTable.ColumnConditionPanel and FilterTable.TableConditionPanel, related refactoring.
  • TableConditionPanel.conditionPanel() now returns Optional.
  • FilterTableConditionPanel.conditionPanels() bug fixed, now actually returns the panels.
  • PersistMenuCheckBoxMenuItem and PersistMenuRadioButtonMenuItem bug fixed, responded to mouse events when disabled.
  • ColumnConditionPanel.ConditionState and state() added, FilterTableConditionPanel.state() added, related refactoring.
  • FilterTable.Builder.filterState() added.
  • FilterColumnConditionPanel.columnConditionPanel() renamed filterColumnConditionPanel().
  • TableConditionPanel.Factory added.
  • FilterTableConditionPanel bug fixed, now overrides updateUI() in order to update hidden components.
  • NumberDocument, NumberField.setRethrowValidationException() added, can now be turned off for the field to prevent invalid input without displaying the exception.
  • TableConditionPanel.conditionPanel() no longer returns Optional.
  • TableConditionPanel.selectCondition() added.
  • TableConditionPanel and ColumnConditionPanel now abstract classes.
  • ColumnConditionPanel.caption() added.
  • TableConditionPanel.selectCondition() renamed selectConditionPanel() and implemented, related refactoring.
  • ColumnConditionPanel.state() no longer abstract.
  • ComponentBuilder.listener() and consumer() added.
  • FilterTable bug fixed, sorting, column reordering and resizing key events were enabled even though the functionality had been disabled.
  • TableConditionPanel.focusEvent() added.
  • FilterColumnConditionPanel now initialized lazily.
  • FilterTableConditionPanel.focusGainedEvent() moved to ColumnConditionPanel, related refactoring.
  • TableConditionPanel.state() now final, controls() implemented, related refactoring.
  • DefaultFilterTableColumnModel.setVisibleColumns() bug fixed, now resets the selected column to zero after the columns have been configured.
  • LookAndFeelSelectionDialogBuilder, FontSizeSelectionDialogBuilder, selection method consumer parameter added, no longer return the selected value.

is.codion.framework.domain

  • DefaultDomain renamed DomainModel.
  • Entity.valuesEqual() instance methods renamed equalValues(), static ones removed.
  • Entity.Builder.withDefaultValues() renamed withDefaults().
  • DomainModel.addAll() renamed add().
  • AbstractQueriedKeyGenerator, IdentityKeyGenerator now remove any previous value from the entity before setting the key value, removing original value related memory churn.
  • Entity.valuesAsString() removed.
  • Entity.mapToValue(), mapToType() and mapKeysToType() renamed groupByValue(), groupByType() and groupKeysByType() respectively.
  • DefaultEntity.createPrimaryKey() now creates a pseudo primary key, containing all column values, for entities without a defined primary key.

is.codion.framework.json.domain

  • EntityObjectMapper.serializeEntities() and serializeKeys() removed.
  • ColumnConditionSerializer bug fixed, did not deserialize case insensitive IN conditions correctly.
  • EntityDeserializer, EntityKeyDeserializer, minor backwards incompatible changes reverted.

is.codion.framework.db.local

  • DefaultLocalEntityConnection.report() exception handling improved, now throws DatabaseException in case of an SQLException.
  • DefaultLocalEntityConnection exception handling refactored in order to guarantee rollbacks in case of RuntimeExceptions.

is.codion.framework.model

  • EntityEditModel.editEvents() renamed postEditEvents, EntityTableModel.editEvents() renamed handleEditEvents().
  • EntityEditEvents.notifyInserted(), notifyUpdated() and notifyDelete() renamed inserted(), updated() and deleted() respectively.
  • EntityEditEvents, consumers now called listeners.
  • EntityTableModel.HANDLE_EDIT_EVENTS configuration value added.
  • EntityModel.activeDetailModels() renamed linkedDetailModels().
  • EntitySearchConditionModel replaced with ForeignKeyConditionModel.
  • EntityTableConditionModel type parameter removed, connectionProvider() added.
  • DefaultEntityConditionModel.createConditionModels() bug fixed, did not respect Factory.include().
  • EntityConditionModelFactory no longer excludes hidden attributes.
  • AbstractForeignKeyConditionModel column identifier type now Attribute instead of ForeignKey.
  • ForeignKeyConditionModel.builder() added, replacing static factory method, available operators now configurable.
  • ForeignKeyConditionModel.condition() added, a shorthand for adding a condition to both the IN and EQUAL search/combobox models.
  • EntityTableConditionModel.setEqualConditionValue() added.
  • DefaultForeignKeyDetailModelLink now uses the EQUAL operator in case of a single value when setting the foreign key condition.
  • ForeignKeyConditionModel renamed DefaultForeignKeyConditionModel.
  • AbstractForeignKeyConditionModel renamed ForeignKeyConditionModel.
  • EntityApplicationModel.warnAboutUnsavedData() and containsUnsavedData() removed.
  • EntityEditModel.WARN_ABOUT_UNSAVED_DATA removed, beforeEntityEvent() added.
  • EntityComboBoxModel, inheritance replaced with composition.
  • DefaultForeignKeyConditionModel renamed ForeignKeyConditionModel, abstract base class removed, inheritance replaced with composition.

is.codion.framework.servlet

  • EntityService refactored.

is.codion.swing.framework.model

  • SwingEntityTableModel.UpdateListener now replaces updated entities.
  • SwingEntityTableModel.replaceEntitiesByKey() now uses a key index map when looking up entities to replace, orders of magnitude faster.
  • EntityComboBoxModel.HANDLE_EDIT_EVENTS configuration value added.
  • EntityComboBoxConditionModel replaced with SwingForeignKeyConditionModel.
  • SwingEntityTableModel EntityConditionModelFactory parameter replaced with EntityTableConditionModel.
  • SwingForeignKeyConditionModel.builder() added, replacing static factory method, available operators now configurable.
  • SwingEntityTableModel bug fixed, now uses a SwingEntityConditionModelFactory by default.
  • EntityComboBoxModel now final.
  • SwingForeignKeyConditionModel, inheritance replaced with composition.

is.codion.swing.framework.model.tools

  • DomainGenerator now uses com.squareup.javapoet to generate the source and generates a full domain implementation class.
  • DomainToString now handles views correctly, refactoring.
  • DomainToString now splits source up into api and implementation.
  • DomainToString now highlights the selected entity definition in the source.
  • DomainGeneratorModel.DEFAULT_DOMAIN_PACKAGE configuration value added.
  • DomainGeneratorModel now orders class elements according to the entity dependency graph and disables strict foreign keys in case of cyclical dependencies.
  • DomainToString, definition ordering improved.

is.codion.swing.framework.ui

  • EntityEditPanel, control configuration refactored, now consistent with EntityTablePanel.
  • EntityTablePanel.PopupMenuConfig and ToolBarConfig removed, quite unnecessary.
  • ControlConfig.control() overloaded for Control.Builder.
  • ControlConfig now Controls.Config, related refactoring.
  • EntityEditComponentPanel bug fixed, modified indicator now also added to labels of components set directly via component().set().
  • EntityEditComponentPanel bug fixed, createLabel() no longer prevents subsequent component creation.
  • EntityTablePanel, selection controls removed from default toolbar.
  • EntityTablePanel, keyboard shortcuts added for moving the selection.
  • EntityTablePanel.TableControl and EntityEditPanel.EditControl renamed EntityTablePanelControl and EntityEditPanelControl, merged with KeyboardShortcut, related refactoring.
  • KeyboardShortcutPanel bug fixed, now displays the correct Add mnemonic.
  • EntityEditPanel.configureControls() renamed setupControls() to prevent confusion. EntityTablePanel.configureControls() renamed setupControls() as well, for consistency.
  • EntityEditPanel, EntityTablePanel, EntityPanel, control setup refactored.
  • TabbedDetailLayout, keyboard shortcuts added for expanding the detail panel.
  • TabbedDetailLayout, now shows the detail panel if hidden when activated.
  • EntityTablePanel.createControls() bug fixed, now only relies on configuration.
  • EntityTablePanel.Config bug fixed, now initializes includeSummaryPanel to false if no summary models are available.
  • TabbedDetailLayout, now shows the parent panel if hidden when activated.
  • TabbedDetailLayout.TabbedDetailLayoutControl.EXPAND_RIGHT and EXPAND_LEFT renamed COLLAPSE and EXPAND respectively, CTRL added to key event button combination, otherwise the table seemed to consume the key events.
  • EntityTablePanel.Config.configureTable() added, createTableCellRenderer() removed.
  • TabbedDetailLayout, expand/collapse improved, now stops in the middle when expanding/collapsing from the opposite extreme.
  • TabbedDetailLayout now activates parent panel when detail panel is collapsed.
  • EntityEditPanel, crud operation builders added, EntityDialogs refactored.
  • EntityTableCellRendererFactory added, related refactoring.
  • EntityTablePanel.StatusPanel.configureLimit() bug fixed, dialog now centered on table.
  • EntityTablePanel.editPanel() added.
  • EntityPanel control configuration refactored, now consistent with EntityEditPanel and EntityTablePanel.
  • EntityPanel, TabbedDetailLayout, now possible to configure the available panel states.
  • EntityComponents now final, constructor private, factory method added.
  • EntityComponents parameter removed from EntityEditComponentPanel constructor.
  • EntityTablePanel.savePreferences() no longer final.
  • EntityTablePanel.selectConditionPanel() bug fixed, now sets locationRelativeTo() the table parent, otherwise the scrolling state seems to interfere with the dialog location calculation.
  • EntityPanel.activeDetailPanels() renamed linkedDetailPanels().
  • EntityPanel, can now navigate to hidden detail panels, TabbedDetailLayout shows a hidden detail panel when activated.
  • EntityTablePanel.StatusPanel refactored to not use CardLayout, otherwise the progress bar keeps updating even when invisible.
  • EntityTablePanel, refresh keystroke Alt-R added.
  • EntityConditionPanelFactory now sets the string provider for the in values list box.
  • EntityTablePanel now removes the condition and filter panels when they are hidden, related refactoring.
  • EntityTablePanel.createConditionPanel() replaced with Config.tableConditionPanelFactory(), conditionPanel no longer initialized lazily.
  • EntityTablePanel, condition panel field configuration moved to EntityFieldFactory.
  • TabbedDetailLayout, detail model link now deactivated when the detail panel is hidden.
  • EntityTablePanel bug fixed, now overrides updateUI() in order to update hidden components.
  • EntityDialogs, add button caption now Add instead of Insert.
  • EntityFieldFactory renamed EntityConditionFieldFactory, now public.
  • EntityComboBox now displays a wait cursor while the model is refreshing.
  • EntityTablePanel bug fixed, refresh toolbar visibility now initialized correctly.
  • EntityTablePanel, table condition panel initialized lazily.
  • EntityApplicationPanel, frame size and maximized state now saved in user preferences, Builder.defaultFrameSize() added.
  • DefaultEntityApplicationPanelBuilder, now displays an empty frame while the application panel is being initialized.
  • EntityApplicationPanel, user preferences functionality improved, related refactoring.
  • EntityEditPanel.Config.modifiedWarning() added, related refactoring.
  • EntityTablePanel.userPreferencesKey() now protected.

is.codion.swing.framework.ui.tools

  • DomainGeneratorPanel.DEFAULT_USERNAME configuration value added.
  • DomainGeneratorPanel.DEFAULT_USERNAME renamed DEFAULT_USER, can include password.
  • DomainGeneratorPanel, save implemented.
  • DomainGeneratorPanel bug fixed, directory creation improved.