├── .gitattributes
├── .github
├── dependabot.yml
└── workflows
│ ├── checkBuild.yml
│ ├── maven
│ └── m2-settings-release.xml
│ ├── release.yml
│ ├── test-deploy.yml
│ └── update-from-template.yml
├── .gitignore
├── .idea
├── checkstyle-idea.xml
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── inspectionProfiles
│ └── Project_Default.xml
└── saveactions_settings.xml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── config
└── checkstyle
│ └── checkstyle.xml
├── pom.xml
└── src
├── main
├── java
│ └── xdev
│ │ └── ui
│ │ ├── DualListBoxSupport.java
│ │ ├── XdevAggregateTable.java
│ │ ├── XdevCSResourceBundle.java
│ │ ├── XdevCollapsiblePane.java
│ │ ├── XdevCollapsiblePaneContainer.java
│ │ ├── XdevColorComboBox.java
│ │ ├── XdevCommandBar.java
│ │ ├── XdevDockableFrame.java
│ │ ├── XdevDockingPanel.java
│ │ ├── XdevDropdownButton.java
│ │ ├── XdevDualListBox.java
│ │ ├── XdevGroupTable.java
│ │ ├── XdevIntelliHints.java
│ │ ├── XdevNmDualListBox.java
│ │ ├── XdevPageNavigationBar.java
│ │ ├── XdevQuickComboBoxFilterField.java
│ │ ├── XdevQuickFilterPane.java
│ │ ├── XdevQuickListFilterField.java
│ │ ├── XdevQuickTableFilterField.java
│ │ ├── XdevQuickTreeFilterField.java
│ │ ├── XdevSimpleScrollPane.java
│ │ ├── XdevSortableTable.java
│ │ ├── XdevTabbedPane2.java
│ │ ├── XdevTreeTable.java
│ │ ├── XdevValueChooserTextField.java
│ │ ├── charts
│ │ ├── AbstractRelationalStructureChart.java
│ │ ├── ChartCategoryValue.java
│ │ ├── GroupableChart.java
│ │ ├── OrientationalCategoryValueChart.java
│ │ ├── RelationalStructureChartDataInitializer.java
│ │ ├── VirtualTableAbstractCategoryChart.java
│ │ ├── XdevAreaChart.java
│ │ ├── XdevBarChart.java
│ │ ├── XdevLineChart.java
│ │ ├── XdevPieChart.java
│ │ ├── XdevPointChart.java
│ │ ├── model
│ │ │ ├── Chart3DOrientationStrategy.java
│ │ │ ├── ChartColorScheme.java
│ │ │ ├── ChartColorSchemeHighlightStrategy.java
│ │ │ ├── ChartDataInitializer.java
│ │ │ ├── ChartOrientation.java
│ │ │ ├── ChartOrientationStrategy.java
│ │ │ ├── HorizontalChartOrientationStrategy.java
│ │ │ ├── MultiColorSchemeHighlightStrategy.java
│ │ │ ├── SingleColorSchemeHightlightStrategy.java
│ │ │ ├── VTNumericNumericChartDataInitializer.java
│ │ │ ├── VTNumericTimeChartDataInitializer.java
│ │ │ ├── VTStringNumericChartDataInitializer.java
│ │ │ ├── VTStringTimeChartDataInitializer.java
│ │ │ ├── VTTimeNumericChartDataInitializer.java
│ │ │ ├── VerticalChartOrientationStrategy.java
│ │ │ └── XdevChartAxisType.java
│ │ └── utils
│ │ │ ├── ChartRangeComputationUtils.java
│ │ │ ├── HSLColor.java
│ │ │ ├── VirtualTableChartUtils.java
│ │ │ └── VirtualTableColumnTypeUtils.java
│ │ ├── combobox
│ │ ├── CSComboBoxModelWrapperLookup.java
│ │ └── CSComboBoxRowConverter.java
│ │ ├── componenttable
│ │ ├── ComponentTable.java
│ │ ├── ComponentTableEditor.java
│ │ ├── ComponentTableModel.java
│ │ ├── ComponentTableRenderer.java
│ │ └── ComponentTableTemplate.java
│ │ ├── duallistbox
│ │ ├── XdevDualListBoxDefaultHandler.java
│ │ ├── XdevDualListBoxHandler.java
│ │ └── icon
│ │ │ ├── bottom.png
│ │ │ ├── down.png
│ │ │ ├── remove.png
│ │ │ ├── remove_all.png
│ │ │ ├── select.png
│ │ │ ├── select_all.png
│ │ │ ├── top.png
│ │ │ └── up.png
│ │ ├── event
│ │ └── SortAdapter.java
│ │ ├── formtable
│ │ ├── FormTableTemplate.java
│ │ ├── XdevFormTable.java
│ │ ├── XdevFormTableEditor.java
│ │ ├── XdevFormTableRenderer.java
│ │ └── XdevFormTableTemplate.java
│ │ ├── ganttchart
│ │ ├── DateGanttVirtualTableSupport.java
│ │ ├── DateRangeProvider.java
│ │ ├── GanttChartVirtualTableRelationSupport.java
│ │ ├── GanttEntryVirtualTableColumnConverter.java
│ │ ├── GanttModelUIInformation.java
│ │ ├── GanttResourceBundle.java
│ │ ├── IntegerRangeProvider.java
│ │ ├── RangeProvider.java
│ │ ├── SpecialRelationalUpdatableEntryCreator.java
│ │ ├── UpdateableGanttEntry.java
│ │ ├── XdevDateGanttChart.java
│ │ ├── XdevGanttChart.java
│ │ ├── XdevGanttEntry.java
│ │ ├── XdevVirtualTableGanttEntry.java
│ │ ├── XdevVirtualTableGanttEntryCreator.java
│ │ ├── action
│ │ │ ├── AbstractRelationManagementStrategy.java
│ │ │ ├── DefaultGanttEntryController.java
│ │ │ ├── DefaultRelationUpdateValidationStrategy.java
│ │ │ ├── DefaultRelationValidationStrategy.java
│ │ │ ├── FtFRelationManagementController.java
│ │ │ ├── FtSRelationManagementController.java
│ │ │ ├── GanttDateScaleAreaUpdater.java
│ │ │ ├── GanttEntryController.java
│ │ │ ├── GanttEntryListener.java
│ │ │ ├── GanttEntryRelationManager.java
│ │ │ ├── GanttRelationController.java
│ │ │ ├── GanttRelationManagementController.java
│ │ │ ├── GanttRelationManagementStrategy.java
│ │ │ ├── GanttRelationUIDeleteCommandListener.java
│ │ │ ├── GanttRelationUIInsertCommandListener.java
│ │ │ ├── GanttRelationValidationStrategy.java
│ │ │ ├── GanttTemplateRemoveKeyAdapter.java
│ │ │ ├── StFRelationManagementController.java
│ │ │ ├── StSRelationManagementController.java
│ │ │ ├── UIRelationManagementStrategy.java
│ │ │ ├── UpdateDateRelationManagementStrategy.java
│ │ │ ├── ValidationGanttEntryController.java
│ │ │ ├── ValidationGanttRelationController.java
│ │ │ ├── VirtualTableUpdateDateGanttChartPopupMenuCustomizer.java
│ │ │ ├── XdevGanttEntryRelationListener.java
│ │ │ └── XdevRelationGanttChartPopupMenuCustomizer.java
│ │ ├── editor
│ │ │ ├── GanttDateDefaultForm.java
│ │ │ ├── GanttEntryRelationRemoveNotifier.java
│ │ │ ├── GanttPercentageSpinner.java
│ │ │ ├── GanttTemplateCustomMenuTest.java
│ │ │ ├── XdevGanttChartPopupMenuInstaller.java
│ │ │ ├── XdevGanttChartRelationConnectionHintPopup.java
│ │ │ ├── XdevGanttTemplateToolBar.java
│ │ │ └── XdevRelationTypeDialog.java
│ │ ├── model
│ │ │ ├── DateGanttDataVTSyncronizer.java
│ │ │ ├── EntryVTMapper.java
│ │ │ ├── GanttEntryMapper.java
│ │ │ ├── GanttPersistence.java
│ │ │ ├── GanttRelationPersistence.java
│ │ │ ├── VirtualTableGanttPersistence.java
│ │ │ ├── VirtualTableGanttRelationPersistence.java
│ │ │ ├── XdevGanttEntryRelationModel.java
│ │ │ ├── XdevGanttEntryVTMappings.java
│ │ │ ├── XdevGanttModelUIInformation.java
│ │ │ ├── XdevGanttRelationVTWrapper.java
│ │ │ ├── XdevVirtualTableGanttModel.java
│ │ │ └── XdevVirtualTableGanttTreeTableModel.java
│ │ ├── template
│ │ │ ├── AbstractGanttTemplate.java
│ │ │ ├── ComponentSplitHandler.java
│ │ │ ├── GanttTemplate.java
│ │ │ ├── GanttTemplateSplitHandler.java
│ │ │ ├── RelationalGanttTemplate.java
│ │ │ ├── SplitableComponent.java
│ │ │ └── XdevGanttTemplate.java
│ │ └── utils
│ │ │ ├── DateGanttEntryColumnType.java
│ │ │ ├── DatePeriodType.java
│ │ │ ├── GanttRelationColumnType.java
│ │ │ ├── VTDateGanttMappingConverter.java
│ │ │ ├── VTGanttRelationMappingConverter.java
│ │ │ ├── VirtualTableGanttPersistenceUtils.java
│ │ │ ├── XdevGanttPersistenceCalculationUtils.java
│ │ │ └── XdevGanttUtils.java
│ │ ├── laf
│ │ ├── JideEclipse3xLookAndFeel.java
│ │ ├── JideEclipseLookAndFeel.java
│ │ ├── JideLookAndFeelExtension.java
│ │ ├── JideOffice2003DefaultLookAndFeel.java
│ │ ├── JideOffice2003GrayLookAndFeel.java
│ │ ├── JideOffice2003HomeSteadLookAndFeel.java
│ │ ├── JideOffice2003MetallicLookAndFeel.java
│ │ ├── JideOffice2003NormalColorLookAndFeel.java
│ │ ├── JideOffice2007LookAndFeel.java
│ │ ├── JideVSNetLookAndFeel.java
│ │ └── JideXertoLookAndFeel.java
│ │ ├── listbox
│ │ ├── CSListBoxRowConverter.java
│ │ └── CSListModelWrapperLookup.java
│ │ ├── quickfilter
│ │ ├── QuickFilterSearchMode.java
│ │ ├── QuickFilterSearchOption.java
│ │ └── XdevNumberConverter.java
│ │ ├── table
│ │ ├── CSTableColumnConverter.java
│ │ ├── CSTableModelWrapperLookup.java
│ │ ├── CSTableRowConverter.java
│ │ ├── CellStyleTableEditor.java
│ │ ├── CellStyleTableRenderer.java
│ │ ├── ExtendedTableSupport.java
│ │ ├── JideSortItemUtils.java
│ │ ├── SortableTablePageControl.java
│ │ ├── VirtualTablePageControlSortListener.java
│ │ ├── VirtualTableSortableTableLazyLoadingTableModel.java
│ │ ├── XdevMultiTableModel.java
│ │ ├── XdevTableModelWrapper.java
│ │ ├── XdevTableScrollPane.java
│ │ ├── XdevTreeTableExpandableRow.java
│ │ └── XdevTreeTableModel.java
│ │ ├── util
│ │ ├── ColorParser.java
│ │ ├── ColorParserUtils.java
│ │ ├── HexColorParser.java
│ │ ├── NumberRGBAColorParser.java
│ │ └── StringRGBAColorParser.java
│ │ ├── utils
│ │ ├── ColorParser.java
│ │ ├── ColorUtils.java
│ │ └── XdevCommaSeparatedColorParser.java
│ │ └── valuechooser
│ │ ├── DefaultVirtualTableValueChooser.java
│ │ ├── PopupVirtualTableValueChooser.java
│ │ ├── ValueChooser.java
│ │ ├── ValueChooserField.java
│ │ ├── ValueChooserTextField.java
│ │ ├── XdevValueChooser.java
│ │ └── XdevValueChooserSupport.java
└── resources
│ ├── icons
│ ├── dockableframe.png
│ ├── tabbedpane_close.gif
│ ├── tabbedpane_closeall.gif
│ ├── tabbedpane_next.png
│ └── tabbedpane_prev.png
│ ├── resources
│ └── images
│ │ └── x16
│ │ ├── add.png
│ │ ├── al_center.png
│ │ ├── al_just.png
│ │ ├── al_left.png
│ │ ├── al_right.png
│ │ ├── archives.png
│ │ ├── arcs.png
│ │ ├── blog.png
│ │ ├── blog_glow.png
│ │ ├── blogpages.png
│ │ ├── bold.png
│ │ ├── br.png
│ │ ├── browser.png
│ │ ├── cancel.png
│ │ ├── categories.png
│ │ ├── cats.png
│ │ ├── cogs.png
│ │ ├── color.png
│ │ ├── comp.png
│ │ ├── complete.png
│ │ ├── config.png
│ │ ├── copy.png
│ │ ├── copyright.png
│ │ ├── current.png
│ │ ├── cut.png
│ │ ├── delete.png
│ │ ├── down.png
│ │ ├── download.png
│ │ ├── drafts.png
│ │ ├── edit1.png
│ │ ├── email.png
│ │ ├── err_feed.png
│ │ ├── err_feed1.png
│ │ ├── export.png
│ │ ├── failed.png
│ │ ├── feed_icon.png
│ │ ├── find.png
│ │ ├── fontsize.png
│ │ ├── help.png
│ │ ├── home.png
│ │ ├── hrule.png
│ │ ├── html.png
│ │ ├── image.png
│ │ ├── img_file.png
│ │ ├── import.png
│ │ ├── italic.png
│ │ ├── link.png
│ │ ├── link1.png
│ │ ├── link3.png
│ │ ├── listordered.png
│ │ ├── listunordered.png
│ │ ├── magnify_down.png
│ │ ├── magnify_up.png
│ │ ├── new_folder.png
│ │ ├── paste.png
│ │ ├── pencil.png
│ │ ├── pin.png
│ │ ├── ping.png
│ │ ├── post.png
│ │ ├── post_pub.png
│ │ ├── pub_all.png
│ │ ├── redo.png
│ │ ├── refresh.png
│ │ ├── remove.png
│ │ ├── save.png
│ │ ├── spellcheck.png
│ │ ├── table.png
│ │ ├── tamb.png
│ │ ├── transfer.png
│ │ ├── trash.png
│ │ ├── trash1.png
│ │ ├── underline.png
│ │ ├── undo.png
│ │ ├── up.png
│ │ ├── update_folder.png
│ │ ├── update_post.png
│ │ ├── update_post_pub.png
│ │ ├── upload.png
│ │ ├── users.png
│ │ ├── webloglink.png
│ │ └── webpages.png
│ └── xdev
│ └── ui
│ ├── charts
│ └── model
│ │ └── res
│ │ ├── XdevChartAxisType.properties
│ │ └── XdevChartAxisType_de.properties
│ ├── ganttchart
│ ├── action
│ │ ├── GanttTemplateRemoveKeyAdapter.properties
│ │ ├── GanttTemplateRemoveKeyAdapter_de.properties
│ │ ├── VirtualTableUpdateDateGanttChartPopupMenuCustomizer.properties
│ │ └── VirtualTableUpdateDateGanttChartPopupMenuCustomizer_de.properties
│ ├── gantt.properties
│ ├── gantt_en.properties
│ ├── icons
│ │ ├── add.png
│ │ ├── close_b_48.png
│ │ ├── connect.png
│ │ ├── disconnect.png
│ │ ├── edit.png
│ │ ├── finish_to_finish.png
│ │ ├── finish_to_start.png
│ │ ├── new.png
│ │ ├── ok.png
│ │ ├── remove.png
│ │ ├── start_to_finish.png
│ │ └── start_to_start.png
│ └── utils
│ │ ├── DatePeriodType.properties
│ │ └── DatePeriodType_de.properties
│ ├── language.properties
│ └── language_de.properties
└── test
└── java
└── xdev
├── category
└── UITest.java
└── ui
├── ChartSampleDataProvider.java
├── TestVtCreator.java
└── XdevTabbedPane2JTest.java
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: github-actions
4 | directory: "/"
5 | schedule:
6 | interval: daily
7 | # Run it at a specific time so that we don't get emails all day long
8 | time: "00:00"
9 | open-pull-requests-limit: 10
10 | ignore:
11 | - dependency-name: "*"
12 | # GitHub actions are using git tags (v1 = v1.2 = v1.2.3) which should be compatible until a major change is performed
13 | update-types:
14 | - "version-update:semver-minor"
15 | - "version-update:semver-patch"
16 | - package-ecosystem: maven
17 | directory: "/"
18 | schedule:
19 | interval: daily
20 | # Run it at a specific time so that we don't get emails all day long
21 | time: "00:00"
22 | open-pull-requests-limit: 10
23 |
--------------------------------------------------------------------------------
/.github/workflows/checkBuild.yml:
--------------------------------------------------------------------------------
1 | name: Check Build
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches: [ develop ]
7 | paths-ignore:
8 | - '**.md'
9 | pull_request:
10 | branches: [ develop ]
11 | paths-ignore:
12 | - '**.md'
13 |
14 | jobs:
15 | build:
16 | runs-on: ubuntu-latest
17 |
18 | strategy:
19 | matrix:
20 | java: [8, 11, 17, 21]
21 | java-package: [jdk]
22 | distribution: [temurin]
23 |
24 | steps:
25 | - uses: actions/checkout@v4
26 |
27 | - name: Set up JDK
28 | uses: actions/setup-java@v4
29 | with:
30 | distribution: ${{ matrix.distribution }}
31 | java-version: ${{ matrix.java }}
32 | java-package: ${{ matrix.java-package }}
33 | cache: 'maven'
34 | server-id: proprietary-xdev-dependencies
35 | server-username: GH_PACKAGES_READ_USERNAME # env variable name for username of Artifactory server
36 | server-password: GH_PACKAGES_READ_TOKEN # env variable name for Artifactory access token
37 |
38 | - name: Build with Maven
39 | run: mvn -B clean verify
40 | env:
41 | GH_PACKAGES_READ_USERNAME: ${{ secrets.GH_PACKAGES_READ_USERNAME }}
42 | GH_PACKAGES_READ_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
43 |
44 | - name: Check for uncommited changes
45 | run: |
46 | if [[ "$(git status --porcelain)" != "" ]]; then
47 | echo ----------------------------------------
48 | echo git status
49 | echo ----------------------------------------
50 | git status
51 | echo ----------------------------------------
52 | echo git diff
53 | echo ----------------------------------------
54 | git diff
55 | echo ----------------------------------------
56 | echo Troubleshooting
57 | echo ----------------------------------------
58 | echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean verify"
59 | exit 1
60 | fi
61 |
62 | - uses: actions/upload-artifact@v3
63 | with:
64 | name: jars-java-${{ matrix.java }}
65 | path: target/*.jar
66 | if-no-files-found: error
67 |
--------------------------------------------------------------------------------
/.github/workflows/maven/m2-settings-release.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 | ossrh
7 | ${env.MAVEN_CENTRAL_USERNAME}
8 | ${env.MAVEN_CENTRAL_TOKEN}
9 |
10 |
11 | gpg.passphrase
12 | ${env.MAVEN_GPG_PASSPHRASE}
13 |
14 |
15 | proprietary-xdev-dependencies
16 | ${env.GH_PACKAGES_READ_USERNAME}
17 | ${env.GH_PACKAGES_READ_TOKEN}
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.github/workflows/test-deploy.yml:
--------------------------------------------------------------------------------
1 | name: Test Deployment CI
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | publish_central: # Publish the code to central
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v4
11 |
12 | - name: Set up JDK OSSRH
13 | uses: actions/setup-java@v4
14 | with: # running setup-java again overwrites the settings.xml
15 | distribution: 'temurin'
16 | java-version: '8'
17 | # server-id: ossrh
18 | # server-username: MAVEN_CENTRAL_USERNAME
19 | # server-password: MAVEN_CENTRAL_TOKEN
20 | # gpg-passphrase: MAVEN_GPG_PASSPHRASE
21 | gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
22 | # Due to https://github.com/actions/setup-java/issues/85 we can only
23 | # add ONE server using setup-java...
24 | overwrite-settings: false
25 |
26 | # ... so let's simply copy a predefined settings.xml file into the m2 folder
27 | # until GH makes it work
28 | - name: Copy predefined settings into home m2 folder
29 | run: |
30 | mkdir -p ~/.m2/
31 | cp .github/workflows/maven/m2-settings-release.xml ~/.m2/settings.xml
32 |
33 | - name: Publish to OSSRH
34 | run: mvn -B deploy -Pxdev-build,ossrh
35 | env:
36 | GH_PACKAGES_READ_USERNAME: ${{ secrets.GH_PACKAGES_READ_USERNAME }}
37 | GH_PACKAGES_READ_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
38 | MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
39 | MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
40 | MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
41 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Maven
2 | target/
3 | pom.xml.tag
4 | pom.xml.releaseBackup
5 | pom.xml.versionsBackup
6 | pom.xml.next
7 | release.properties
8 | dependency-reduced-pom.xml
9 | buildNumber.properties
10 | .mvn/timing.properties
11 | # https://github.com/takari/maven-wrapper#usage-without-binary-jar
12 | .mvn/wrapper/maven-wrapper.jar
13 |
14 |
15 | # Compiled class file
16 | *.class
17 |
18 | # Log file
19 | *.log
20 |
21 | # BlueJ files
22 | *.ctxt
23 |
24 | # Mobile Tools for Java (J2ME)
25 | .mtj.tmp/
26 |
27 | # Package/Binary Files don't belong into a git repo
28 | *.jar
29 | *.war
30 | *.nar
31 | *.ear
32 | *.zip
33 | *.tar.gz
34 | *.rar
35 | *.dll
36 | *.exe
37 | *.bin
38 |
39 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
40 | hs_err_pid*
41 |
42 |
43 | # bin / compiled stuff
44 | target/
45 |
46 |
47 | # JRebel
48 | **/resources/rebel.xml
49 | **/resources/rebel-remote.xml
50 |
51 | # eclispe stuff for root
52 | /.settings/
53 | /.classpath
54 | /.project
55 |
56 |
57 | # eclispe stuff for modules
58 | /*/.metadata/
59 | /*/.apt_generated_tests/
60 | /*/.settings/
61 | /*/.classpath
62 | /*/.project
63 | /*/RemoteSystemsTempFiles/
64 |
65 | #custom
66 | .flattened-pom.xml
67 | .tern-project
68 |
69 | # == IntelliJ ==
70 | *.iml
71 | *.ipr
72 |
73 | # Some files are user/installation independent and are used for configuring the IDE
74 | # See also https://stackoverflow.com/a/35279076
75 |
76 | .idea/*
77 | !.idea/saveactions_settings.xml
78 | !.idea/checkstyle-idea.xml
79 |
80 | !.idea/inspectionProfiles/
81 | .idea/inspectionProfiles/*
82 | !.idea/inspectionProfiles/Project_Default.xml
83 |
84 | !.idea/codeStyles/
85 | .idea/codeStyles/*
86 | !.idea/codeStyles/codeStyleConfig.xml
87 | !.idea/codeStyles/Project.xml
88 |
--------------------------------------------------------------------------------
/.idea/checkstyle-idea.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 10.1
5 | JavaOnlyWithTests
6 | true
7 | true
8 |
9 |
10 |
11 |
12 |
13 |
14 | (bundled)
15 | (bundled)
16 | $PROJECT_DIR$/config/checkstyle/checkstyle.xml
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/saveactions_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 6.0.2
2 | * Updated dependencies
3 | * Migrated internal build to ``GitHub packages``
4 |
5 | ## 6.0.1
6 | * Updated xapi to ``6.0.1``
7 | * Updated maven plugins
8 |
9 | ## 6.0.0
10 | * Published this library as open source
11 | * Ensured build compatibility with Java 8, 11 and 17
12 |
13 | Before version 6.0.0, csapi was distributed as commercial software.
14 | We provide this framework that was built on top of JIDE Components as open-source. However, to use it you have to license the base components from JIDE [https://www.jidesoft.com](https://www.jidesoft.com). Mention that you are using XDEV Component Suite and get a discounted license.
15 |
16 | *Feel free to contact us or open an issue if you have any questions.*
17 |
18 | ### Complete overview about the new XDEV (IDE) Framework in version 6
19 | 
20 |
21 | ### Dropped components
22 | These components are dropped from the XDEV Component Suite.
23 |
24 | | Component | Comment |
25 | | -- | -- |
26 | | XdevCalendar | XDEV Calendar is based on the ``MigCalendar`` component which is no longer supported. https://www.componentsource.com/brand/mig-infocom |
27 | | XdevTextEditor| Various problems - Does not support Java9+ |
28 | | Synthetica Look And Feels | The Synthetica Look and Feels are no longer part of the XDEV Component Suite, because the integration code did not add that much value to the usage of the Look and Feels. You can get an up-to-date version of the Look and Feels at https://www.jyloo.com |
29 |
30 | *Feel free to contact us if you require integrations for the dropped components*
31 |
32 | ### New components
33 | All components from the ``biapi-commercial`` got integrated into the ``csapi``.
34 |
35 | These include:
36 | * XdevGanttChart
37 | * XdevAreaChart
38 | * XdevBarChart
39 | * XdevLineChart
40 | * XdevPieChart
41 | * XdevPointChart
42 |
43 |
44 | ### Dependencies
45 | You must provide a [repositroy](https://maven.apache.org/guides/mini/guide-multiple-repositories.html) in your `pom.xml` with the JIDE dependencies to run a build.
46 | These artifacts are available from https://www.jidesoft.com.
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing
2 |
3 | We would absolutely love to get the community involved, and we welcome any form of contributions – comments and questions on different communication channels, issues and pull request and anything that you build and share using our components.
4 |
5 | ### Communication channels
6 | * Communication is primarily done using issues.
7 | * If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
8 | * As a last resort measure or on otherwise important matter you may also [contact us directly](https://xdev.software/en/about-us/contact).
9 |
10 | ### Ways to help
11 | * **Report bugs** Create an issue or send a pull request
12 | * **Send pull requests** If you want to contribute code, check out the development instructions below.
13 | * However when contributing new features, please first discuss the change you wish to make via issue with the owners of this repository before making a change. Otherwise your work might be rejected and your effort was pointless.
14 |
15 | We also encourage you to read the [contribution instructions by GitHub](https://docs.github.com/en/get-started/quickstart/contributing-to-projects).
16 |
17 | ## Developing
18 |
19 | ### Software Requirements
20 | You should have the following things installed:
21 | * Git
22 | * Java 8, 11 or 17 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/))
23 | * Maven
24 |
25 | ### Recommended setup
26 | * Install ``IntelliJ`` (Community Edition is sufficient)
27 | * Install the following plugins:
28 | * [Save Actions](https://plugins.jetbrains.com/plugin/22113) - Provides save actions, like running the formatter or adding ``final`` to fields
29 | * [SonarLint](https://plugins.jetbrains.com/plugin/7973-sonarlint) - CodeStyle/CodeAnalysis
30 | * [Checkstyle-IDEA](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) - CodeStyle/CodeAnalysis
31 | * Import the project
32 | * Ensure that everything is encoded in ``UTF-8``
33 | * Ensure that the JDK/Java-Version is correct
34 |
35 | ## Releasing [](https://github.com/xdev-software/csapi/actions/workflows/release.yml)
36 |
37 | Before releasing:
38 | * Consider doing a [test-deployment](https://github.com/xdev-software/csapi/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
39 | * Check the [changelog](CHANGELOG.md)
40 |
41 | If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes.
42 |
43 | When the release is finished do the following:
44 | * Merge the auto-generated PR (with the incremented version number) back into the ``develop``
45 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Reporting a Vulnerability
4 |
5 | Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/csapi/security/advisories/new).
6 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/XdevCSResourceBundle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui;
19 |
20 |
21 | import java.text.MessageFormat;
22 | import java.util.ResourceBundle;
23 |
24 |
25 | /**
26 | * Helper class for component suite resource bundle.
27 | *
28 | * @author XDEV Software
29 | *
30 | */
31 | public class XdevCSResourceBundle
32 | {
33 | /**
34 | * serialVersionUID.
35 | */
36 | private static ResourceBundle resourceBundle;
37 |
38 | /**
39 | * name of the language properties file.
40 | */
41 | private static final String BUNDLE_NAME = ".language";
42 |
43 |
44 | /**
45 | * @return the ResourceBundle for the calendar package
46 | */
47 | private static ResourceBundle getBundle()
48 | {
49 | if(resourceBundle == null)
50 | {
51 | resourceBundle = ResourceBundle.getBundle(XdevCSResourceBundle.class.getPackage()
52 | .getName() + BUNDLE_NAME);
53 | }
54 |
55 | return resourceBundle;
56 | }
57 |
58 |
59 | /**
60 | * Return a specified String from the bundle of the calendar.
61 | *
62 | * @param key
63 | * the key to lookup the value
64 | * @param args
65 | * optional values to replace the placeholders with
66 | * @return a String
67 | */
68 | public static String getString(String key, Object... args)
69 | {
70 | String str = getBundle().getString(key);
71 |
72 | if(args != null && args.length > 0)
73 | {
74 | str = MessageFormat.format(str,args);
75 | }
76 |
77 | return str;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/XdevCommandBar.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui;
19 |
20 |
21 | import com.jidesoft.action.CommandBar;
22 |
23 |
24 | /**
25 | * {@link XdevCommandBar} is a kind of Dockable Bar. It can be used to implement
26 | * toolbar's and menu bars.
27 | *
28 | * @author XDEV Software
29 | *
30 | */
31 | public class XdevCommandBar extends CommandBar
32 | {
33 | /**
34 | * serialVersionUID.
35 | */
36 | private static final long serialVersionUID = 1L;
37 |
38 |
39 | /**
40 | * @see CommandBar#CommandBar()
41 | */
42 | public XdevCommandBar()
43 | {
44 | super();
45 | }
46 |
47 |
48 | /**
49 | * @param orientation
50 | * the orientation, either HORIZONTAL or VERTICAL
51 | * @see CommandBar#CommandBar()
52 | */
53 | public XdevCommandBar(int orientation)
54 | {
55 | super(orientation);
56 | }
57 |
58 |
59 | /**
60 | * @param key
61 | * the key of the CommandBar
62 | * @param title
63 | * the title of the CommandBar
64 | * @param orientation
65 | * the orientation, either HORIZONTAL or VERTICAL
66 | * @see CommandBar#CommandBar(String, String, int)
67 | */
68 | public XdevCommandBar(String key, String title, int orientation)
69 | {
70 | super(key,title,orientation);
71 | }
72 |
73 |
74 | /**
75 | * @param key
76 | * the key of the CommandBar
77 | * @param title
78 | * the title of the CommandBar
79 | * @see CommandBar#CommandBar(String, String)
80 | */
81 | public XdevCommandBar(String key, String title)
82 | {
83 | super(key,title);
84 | }
85 |
86 |
87 | /**
88 | * @param key
89 | * the key of the CommandBar
90 | * @see CommandBar#CommandBar(String)
91 | */
92 | public XdevCommandBar(String key)
93 | {
94 | super(key);
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/charts/ChartCategoryValue.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.charts;
19 |
20 |
21 | import java.awt.Paint;
22 |
23 | import com.jidesoft.chart.Chart;
24 |
25 |
26 | /**
27 | * Wrapper for a {@link Chart} category value and its paint.
28 | *
29 | *
30 | * @author XDEV Software jwill
31 | *
32 | * @param
33 | * the category value type.
34 | */
35 | public interface ChartCategoryValue
36 | {
37 | void setCategoryValue(CT categoryValue);
38 |
39 |
40 | CT getCategoryValue();
41 |
42 |
43 | void setCategoryPaint(Paint fill);
44 |
45 |
46 | Paint getCategoryPaint();
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/charts/GroupableChart.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.charts;
19 |
20 |
21 | /**
22 | * Specifies a groupable Chart.
23 | *
24 | *
25 | * @author XDEV Software jwill
26 | * @since 4.0
27 | */
28 | public interface GroupableChart
29 | {
30 | static final double DEFAULT_BAR_GAP_PROPORTION = 0.8;
31 | static final double DEFAULT_BAR_GROUP_GAP_PROPORTION = 0.2;
32 |
33 |
34 | /**
35 | * Groups the charts bars.
36 | *
37 | * @param barsGrouped
38 | * indicates if the charts should be grouped or not.
39 | */
40 | void setBarsGrouped(boolean barsGrouped);
41 |
42 |
43 | /**
44 | * Returns the charts grouped state.
45 | *
46 | * @return indicates if the charts are grouped or not.
47 | */
48 | boolean isBarsGrouped();
49 |
50 |
51 | /**
52 | * Specifies the gap (in pixels) between groups of bars in a grouped bar
53 | * chart.
54 | *
55 | * @param barGroupGap
56 | * the group gap to set.
57 | */
58 | void setBarGroupGap(int barGroupGap);
59 |
60 |
61 | /**
62 | * Specifies the pixel gap between bars in a bar chart.
63 | *
64 | * @param barGap
65 | * the bar gap to set.
66 | */
67 | void setBarGap(int barGap);
68 |
69 |
70 | /**
71 | * Returns the bar gap.
72 | *
73 | * @return the set bar gap.
74 | */
75 | int getBarGap();
76 |
77 |
78 | /**
79 | * Specify the size of the group gap as a proportion of the space available
80 | * to the group.
81 | *
82 | * @param barGroupGapProportion
83 | * the bar group gap proportion to set.
84 | */
85 | void setBarGroupGapProportion(Double barGroupGapProportion);
86 | }
87 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/charts/RelationalStructureChartDataInitializer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.charts;
19 |
20 |
21 | import java.sql.ResultSet;
22 |
23 | import xdev.vt.VirtualTable;
24 |
25 |
26 | /**
27 | * Indicator for XY Charts with a table structure based data set, for example
28 | * {@link VirtualTable} or {@link ResultSet}.
29 | *
30 | *
31 | * If the Chart dataSet should be ObjectGraph based, the API foundation would be
32 | * {@link OrientationalCategoryValueChart}.
33 | *
34 | *
35 | * @param
36 | * the container type which provides the model data.
37 | *
38 | * @author XDEV Software jwill
39 | * @since 4.0
40 | */
41 | public interface RelationalStructureChartDataInitializer
42 | {
43 | /**
44 | * Create the chart content from the given data container, for example a
45 | * {@link VirtualTable}.
46 | *
47 | * @param categoryColumn
48 | * the category column
49 | * @param valueColumn
50 | * the value column
51 | * @param container
52 | * the data container, for example {@link VirtualTable}.
53 | * @param groupColumns
54 | * the optional group columns.
55 | */
56 | public void setModel(ValueType categoryColumn, ValueType valueColumn, ContainerType container,
57 | ValueType... groupColumns);
58 |
59 |
60 | /**
61 | * Create the chart content from the given data container, for example a
62 | * {@link VirtualTable}.
63 | *
64 | * @param categoryColumn
65 | * the category column
66 | * @param valueColumn
67 | * the value column
68 | * @param depthColumn
69 | * for including z-axis values.
70 | * @param container
71 | * the data container.
72 | * @param groupColumns
73 | * the optional group columns.
74 | */
75 | public void setModel(ValueType categoryColumn, ValueType valueColumn, ValueType depthColumn,
76 | ContainerType container, ValueType... groupColumns);
77 | }
78 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/charts/model/Chart3DOrientationStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.charts.model;
19 |
20 |
21 | import xdev.ui.charts.XdevBarChart;
22 |
23 | import com.jidesoft.chart.model.ChartPoint;
24 | import com.jidesoft.chart.model.Highlight;
25 | import com.jidesoft.range.Positionable;
26 |
27 |
28 | /**
29 | * Computes the chart orientation inclusive z-axis value.
30 | *
31 | * An example could be a {@link XdevBarChart} with horizontal bars
32 | *
33 | *
34 | * @author XDEV Software jwill
35 | * @since 4.0
36 | */
37 | public interface Chart3DOrientationStrategy extends ChartOrientationStrategy
38 | {
39 | /**
40 | * Computes the point values depending on the set chart orientation.
41 | *
42 | * @param category
43 | * the category axis value.
44 | * @param value
45 | * the value axis value.
46 | * @param depthValue
47 | * the z-axis value.
48 | *
49 | * @return the computed point values.
50 | */
51 | public ChartPoint getOrientedPoint(Positionable category, Positionable value,
52 | Positionable depthValue);
53 |
54 |
55 | /**
56 | * Computes the point values depending on the set chart orientation.
57 | *
58 | * @param category
59 | * the category axis value.
60 | * @param value
61 | * the value axis value.
62 | * @param depthValue
63 | * the z-axis value.
64 | * @param highlight
65 | * the point {@link Highlight} (e.g. color value).
66 | *
67 | * @return the computed point values.
68 | */
69 | public ChartPoint getOrientedPoint(Positionable category, Positionable value,
70 | Positionable depthValue, Highlight highlight);
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/charts/model/ChartColorScheme.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.charts.model;
19 |
20 |
21 | import java.awt.Color;
22 |
23 |
24 | /**
25 | *
26 | * @author XDEV Software jwill
27 | * @since 4.0
28 | */
29 | public enum ChartColorScheme
30 | {
31 | // HSB Values
32 | // 1,115,127
33 | RED(new Color(236,216,216), new SingleColorSchemeHightlightStrategy()),
34 | // 53, 101,130
35 | GREEN(new Color(227,235,217), new SingleColorSchemeHightlightStrategy()),
36 | // 142,109,126
37 | BLUE(new Color(241,244,250), new SingleColorSchemeHightlightStrategy()),
38 | // 178,60,123
39 | MAGENTA(new Color(222,218,229), new SingleColorSchemeHightlightStrategy()),
40 | // 160,0,75
41 | GREY(new Color(255,255,255), new SingleColorSchemeHightlightStrategy()),
42 | COMBINATION(new Color(0,0,0), new MultiColorSchemeHighlightStrategy());
43 |
44 | public ChartColorSchemeHighlightStrategy getHightlightStrategy()
45 | {
46 | return hightlightStrategy;
47 | }
48 |
49 | private Color baseColor;
50 | private ChartColorSchemeHighlightStrategy hightlightStrategy;
51 |
52 |
53 | /**
54 | * @return the baseColor
55 | */
56 | public Color getBaseColor()
57 | {
58 | return baseColor;
59 | }
60 |
61 |
62 | private ChartColorScheme(Color baseColor, ChartColorSchemeHighlightStrategy hightlightStrategy)
63 | {
64 | this.baseColor = baseColor;
65 | this.hightlightStrategy = hightlightStrategy;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/charts/model/ChartColorSchemeHighlightStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.charts.model;
19 |
20 |
21 | import java.awt.Color;
22 | import java.util.Collection;
23 | import java.util.List;
24 |
25 | import com.jidesoft.chart.model.ChartModel;
26 | import com.jidesoft.chart.model.DefaultChartModel;
27 |
28 | import xdev.ui.charts.AbstractRelationalStructureChart;
29 |
30 |
31 | /**
32 | * Defines how chart points will be colorized.
33 | *
34 | * @author jwill
35 | * @since 4.0
36 | */
37 | public interface ChartColorSchemeHighlightStrategy
38 | {
39 | /**
40 | * Colorizes each chart point.
41 | *
42 | * @param chart
43 | * the chart to colorize.
44 | * @param modelToAdd
45 | * the chart model to add.
46 | * @param color
47 | * the basis color.
48 | */
49 | void addPointColorSchemeHighlights(AbstractRelationalStructureChart, ?> chart,
50 | ChartModel modelToAdd, Color color);
51 |
52 |
53 | /**
54 | * Returns a collection of colors starting from the given
55 | * {@link ChartColorScheme#getBaseColor()} fitting the given chart models.
56 | *
57 | * @param modelsToAdd
58 | * the concerned {@link ChartModel}s.
59 | * @param colorScheme
60 | * the defined colorScheme the basis color.
61 | * @return a color scheme fitting the given chart models.
62 | */
63 | List getColorScheme(Collection modelsToAdd,
64 | ChartColorScheme colorScheme);
65 | }
66 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/charts/model/ChartDataInitializer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.charts.model;
19 |
20 |
21 | import xdev.ui.charts.AbstractRelationalStructureChart;
22 |
23 |
24 | /**
25 | * Initializes a charts axis and data.
26 | *
27 | * @param
28 | * the container type which provides the model data.
29 | *
30 | * @author XDEV Software jwill
31 | * @since 4.0
32 | */
33 | public interface ChartDataInitializer
34 | {
35 |
36 | static final Chart3DOrientationStrategy DEFAULT_ORIENTATION_STRATEGY = new VerticalChartOrientationStrategy();
37 | static final ChartColorScheme DEFAULT_CHART_COLORSCHEME = ChartColorScheme.BLUE;
38 |
39 |
40 | public void initializeChartModel(ContainerType container, ValueType categoryColumnIndex,
41 | ValueType valueColumnIndex, Chart3DOrientationStrategy orientation,
42 | ValueType... seriesColumnIndices);
43 |
44 |
45 | public void initializeChartModel(ContainerType container, ValueType categoryColumnIndex,
46 | ValueType valueColumnIndex, ValueType depthColumnIndex,
47 | Chart3DOrientationStrategy orientation, ValueType... seriesColumnIndices);
48 |
49 |
50 | /**
51 | * Returns the initialized chart.
52 | *
53 | * @return the initialized chart.
54 | */
55 | AbstractRelationalStructureChart getChart();
56 |
57 |
58 | /**
59 | * Sets the chart to initialize.
60 | *
61 | * @param chart
62 | * the chart to initialize.
63 | */
64 | void setChart(AbstractRelationalStructureChart chart);
65 |
66 |
67 | /**
68 | *
69 | * @param colorScheme
70 | */
71 | void setChartColorScheme(ChartColorScheme colorScheme);
72 |
73 |
74 | /**
75 | *
76 | * @return
77 | */
78 | ChartColorScheme getChartColorScheme();
79 | }
80 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/charts/model/ChartOrientation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.charts.model;
19 |
20 |
21 | /**
22 | * ChartOrientation
mode.
23 | *
24 | * @author XDEV Software jwill
25 | * @since 4.0
26 | *
27 | */
28 | public enum ChartOrientation
29 | {
30 | /**
31 | * Horizontal chart alignment.
32 | */
33 | HORIZONTAL(new HorizontalChartOrientationStrategy()),
34 |
35 | /**
36 | * Vertical chart alignment.
37 | */
38 | VERTICAL(new VerticalChartOrientationStrategy());
39 |
40 | private final Chart3DOrientationStrategy orientation;
41 |
42 |
43 | /**
44 | * @return the orientation
45 | */
46 | public Chart3DOrientationStrategy getOrientation()
47 | {
48 | return orientation;
49 | }
50 |
51 |
52 | ChartOrientation(Chart3DOrientationStrategy orientation)
53 | {
54 | this.orientation = orientation;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/combobox/CSComboBoxModelWrapperLookup.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.combobox;
19 |
20 |
21 | import javax.swing.ComboBoxModel;
22 |
23 | import com.jidesoft.combobox.ComboBoxModelWrapperUtils;
24 |
25 |
26 | public class CSComboBoxModelWrapperLookup extends DefaultComboBoxModelWrapperLookup
27 | {
28 | @Override
29 | public ComboBoxModel lookupComboBoxModel(ComboBoxModel outerModel, Class innerModelClass)
30 | {
31 | return ComboBoxModelWrapperUtils.getActualComboBoxModel(outerModel,innerModelClass);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/componenttable/ComponentTableModel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.componenttable;
19 |
20 |
21 | import javax.swing.event.TableModelListener;
22 | import javax.swing.table.TableModel;
23 |
24 | import com.jidesoft.grid.TableModelWrapper;
25 |
26 |
27 | /**
28 | *
29 | * @author XDEV Software (RHHF)
30 | * @see ComponentTable
31 | * @since 4.0
32 | */
33 |
34 | public class ComponentTableModel implements TableModel, TableModelWrapper
35 | {
36 | private TableModel model;
37 |
38 |
39 | public ComponentTableModel(TableModel model)
40 | {
41 | this.model = model;
42 | }
43 |
44 |
45 | @Override
46 | public TableModel getActualModel()
47 | {
48 | return model;
49 | }
50 |
51 |
52 | @Override
53 | public int getColumnCount()
54 | {
55 | return 1;
56 | }
57 |
58 |
59 | @Override
60 | public int getRowCount()
61 | {
62 | return model.getRowCount();
63 | }
64 |
65 |
66 | @Override
67 | public String getColumnName(int columnIndex)
68 | {
69 | return model.getColumnName(columnIndex);
70 | }
71 |
72 |
73 | @Override
74 | public Class> getColumnClass(int columnIndex)
75 | {
76 | return model.getColumnClass(columnIndex);
77 | }
78 |
79 |
80 | @Override
81 | public boolean isCellEditable(int rowIndex, int columnIndex)
82 | {
83 | return true;
84 | }
85 |
86 |
87 | @Override
88 | public Object getValueAt(int rowIndex, int columnIndex)
89 | {
90 | return model.getValueAt(rowIndex,columnIndex);
91 | }
92 |
93 |
94 | @Override
95 | public void setValueAt(Object aValue, int rowIndex, int columnIndex)
96 | {
97 | model.setValueAt(aValue,rowIndex,columnIndex);
98 | }
99 |
100 |
101 | @Override
102 | public void addTableModelListener(TableModelListener l)
103 | {
104 | model.addTableModelListener(l);
105 | }
106 |
107 |
108 | @Override
109 | public void removeTableModelListener(TableModelListener l)
110 | {
111 | model.removeTableModelListener(l);
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/componenttable/ComponentTableTemplate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.componenttable;
19 |
20 |
21 | import java.awt.Dimension;
22 | import java.awt.LayoutManager;
23 |
24 |
25 | /**
26 | *
27 | * @author XDEV Software (RHHF)
28 | * @see ComponentTable
29 | * @since 4.0
30 | */
31 | public interface ComponentTableTemplate
32 | {
33 |
34 | /**
35 | * Gets the preferred size of this component.
36 | *
37 | * @return a dimension object indicating this component's preferred size
38 | * @see LayoutManager
39 | */
40 | public Dimension getPreferredSize();
41 |
42 |
43 | /**
44 | * Called as part of the editor lifecycle, when the editor is closed.
45 | */
46 | public void onEditorClose();
47 |
48 |
49 | /**
50 | *
51 | * @param o
52 | */
53 | public void setValue(T o);
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/XdevDualListBoxDefaultHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.duallistbox;
19 |
20 |
21 | import xdev.lang.OperationCanceledException;
22 | import xdev.ui.ItemList.Entry;
23 | import xdev.ui.XdevDualListBox;
24 |
25 |
26 | /**
27 | * A default implementation for {@link XdevDualListBoxHandler}.
28 | *
29 | * Can be overwritten and set in {@link XdevDualListBox} to customize the
30 | * behavior of it.
31 | *
32 | *
33 | * @author XDEV Software
34 | *
35 | */
36 | public class XdevDualListBoxDefaultHandler implements XdevDualListBoxHandler
37 | {
38 | /**
39 | * Default Constructor.
40 | */
41 | public XdevDualListBoxDefaultHandler()
42 | {
43 | }
44 |
45 | /**
46 | *
47 | */
48 | private static final long serialVersionUID = 1L;
49 |
50 |
51 | /**
52 | * Default implementation for mapping available entries to selected entries.
53 | *
54 | * @param availableEntry
55 | * an entry being selected
56 | * @return the reference to the availableEntry
57 | * @throws OperationCanceledException
58 | * if user cancels the operation to add an entry
59 | */
60 | @Override
61 | public Entry onAddToSelected(Entry availableEntry) throws OperationCanceledException
62 | {
63 | Entry selectedEntry = availableEntry.clone();
64 | selectedEntry.setEnabled(true);
65 | return selectedEntry;
66 | }
67 |
68 |
69 | /**
70 | * Default implementation for mapping available entries to selected entries.
71 | *
72 | * @param selectedEntry
73 | * the entry to be removed
74 | * @return the reference to the selectedEntry
75 | */
76 | @Override
77 | public Entry onRemoveFromSelected(Entry selectedEntry)
78 | {
79 | return selectedEntry.clone();
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/XdevDualListBoxHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.duallistbox;
19 |
20 |
21 | import java.io.Serializable;
22 |
23 | import xdev.lang.OperationCanceledException;
24 | import xdev.ui.ItemList.Entry;
25 | import xdev.ui.XdevDualListBox;
26 |
27 |
28 | /**
29 | * This interface contains the methods that are used to control the component
30 | * {@link XdevDualListBox}.
31 | *
32 | * @author XDEV Software
33 | *
34 | */
35 | public interface XdevDualListBoxHandler extends Serializable
36 | {
37 | /**
38 | * Called, when an available entry is moved to selected.
39 | *
40 | * @param availableEntry
41 | * an {@link Entry} from the available list to be mapped as
42 | * selected entry
43 | * @return an {@link Entry} representing the passed available {@link Entry}
44 | * as selected.
45 | * @throws OperationCanceledException
46 | * if user cancels the operation to add an entry
47 | */
48 | public Entry onAddToSelected(Entry availableEntry) throws OperationCanceledException;
49 |
50 |
51 | /**
52 | * Called, when an selected entry is removed and if the
53 | * {@code selectionmode} of the containing {@link XdevDualListBox} is
54 | * {@code REMOVE_SELECTED}.
55 | *
56 | * The counterpart to {@link #onAddToSelected(Entry)} method.
57 | *
58 | *
59 | * @param selectedEntry
60 | * an {@link Entry} from the selected list to be mapped as
61 | * available entry
62 | * @return an {@link Entry} representing the passed selected {@link Entry}
63 | * as available.
64 | */
65 | public Entry onRemoveFromSelected(Entry selectedEntry);
66 | }
67 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/icon/bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/java/xdev/ui/duallistbox/icon/bottom.png
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/icon/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/java/xdev/ui/duallistbox/icon/down.png
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/icon/remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/java/xdev/ui/duallistbox/icon/remove.png
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/icon/remove_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/java/xdev/ui/duallistbox/icon/remove_all.png
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/icon/select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/java/xdev/ui/duallistbox/icon/select.png
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/icon/select_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/java/xdev/ui/duallistbox/icon/select_all.png
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/icon/top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/java/xdev/ui/duallistbox/icon/top.png
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/duallistbox/icon/up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/java/xdev/ui/duallistbox/icon/up.png
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/event/SortAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.event;
19 |
20 |
21 | import com.jidesoft.grid.SortEvent;
22 | import com.jidesoft.grid.SortListener;
23 | import com.jidesoft.grid.SortableTableModel;
24 |
25 |
26 | /**
27 | * Event adapter for the {@link SortListener} interface.
28 | *
29 | * @author XDEV Software
30 | */
31 | public abstract class SortAdapter implements SortListener
32 | {
33 | /**
34 | * Called whenever the sorting index of {@link SortableTableModel} changed.
35 | *
36 | * @param event
37 | * a {@link SortEvent}
38 | */
39 | @Override
40 | public void sortChanged(SortEvent event)
41 | {
42 | }
43 |
44 |
45 | /**
46 | * Called whenever the sorting index of {@link SortableTableModel} is about
47 | * to change.
48 | *
49 | * @param event
50 | * a {@link SortEvent}
51 | */
52 | @Override
53 | public void sortChanging(SortEvent event)
54 | {
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/formtable/FormTableTemplate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.formtable;
19 |
20 |
21 | import xdev.ui.componenttable.ComponentTableTemplate;
22 | import xdev.vt.VirtualTable.VirtualTableRow;
23 |
24 |
25 | /**
26 | *
27 | * @author XDEV Software
28 | * @since 4.0
29 | */
30 | public interface FormTableTemplate extends ComponentTableTemplate
31 | {
32 | /**
33 | * Sets whether values of this editor will be written to the database or
34 | * not.
35 | *
36 | * @param synchronizeDB
37 | * if true
the values of this editor will be written
38 | * to the database; otherwise they will not.
39 | */
40 | public void setSynchronizeDB(boolean synchronizeDB);
41 |
42 |
43 | /**
44 | * Determines whether values of this editor will be written to the database
45 | * or not.
46 | *
47 | * @return true
if the values of this editor will be written to
48 | * the database; otherwise false
49 | * @see #setSynchronizeDB(boolean)
50 | */
51 | public boolean isSynchronizeDB();
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/formtable/XdevFormTableRenderer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.formtable;
19 |
20 |
21 | import java.awt.Component;
22 |
23 | import javax.swing.JTable;
24 |
25 | import xdev.ui.TableSupport;
26 | import xdev.ui.componenttable.ComponentTableRenderer;
27 | import xdev.ui.componenttable.ComponentTableTemplate;
28 | import xdev.vt.VirtualTable.VirtualTableRow;
29 | import xdev.vt.VirtualTableWrapper;
30 |
31 |
32 | /**
33 | *
34 | * @author XDEV Software (RHHF)
35 | * @author XDEV Software (FHAE)
36 | * @since 4.0
37 | */
38 | public class XdevFormTableRenderer extends ComponentTableRenderer
39 | {
40 | /**
41 | * @param templateClass
42 | */
43 | public XdevFormTableRenderer(
44 | Class extends ComponentTableTemplate> templateClass)
45 | {
46 | super(templateClass);
47 | }
48 |
49 |
50 | @Override
51 | protected VirtualTableRow getRowValues(JTable table, Object value, boolean isSelected,
52 | int rowIndex, int columnIndex, int actualRowIndex)
53 | {
54 |
55 | VirtualTableWrapper wrap = (VirtualTableWrapper)TableSupport.getTableModelWrapperLookup()
56 | .lookupTableModel(table.getModel(),VirtualTableWrapper.class);
57 | if(wrap == null)
58 | {
59 | throw new IllegalStateException(
60 | "Tablemodel / Tablemodelhierarchy does not wrap a VirtualTable.");
61 | }
62 |
63 | try
64 | {
65 | return wrap.getVirtualTableRow(actualRowIndex);
66 | }
67 | catch(ArrayIndexOutOfBoundsException e)
68 | {
69 | // row not loaded yet (lazy loading)
70 | return null;
71 | }
72 | }
73 |
74 |
75 | @Override
76 | protected void decorateTemplate(Component template, JTable table, int row, int column,
77 | boolean isSelected)
78 | {
79 | if(table instanceof XdevFormTable)
80 | {
81 | ((XdevFormTable)table).decorateTemplate(template,row,column,isSelected);
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/DateRangeProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart;
19 |
20 |
21 | import java.util.Date;
22 |
23 | import com.jidesoft.range.Range;
24 | import com.jidesoft.range.TimeRange;
25 |
26 |
27 | /**
28 | * Provides {@link TimeRange}s prepared with given start and end values.
29 | *
30 | * @author XDEV Software jwill
31 | * @since 4.0
32 | */
33 | public class DateRangeProvider implements RangeProvider
34 | {
35 |
36 | /**
37 | * {@inheritDoc}
38 | */
39 | @Override
40 | public Range provideRange(Date start, Date end)
41 | {
42 | return new TimeRange(start,end);
43 | }
44 |
45 |
46 | /**
47 | * {@inheritDoc}
48 | */
49 | @Override
50 | public Range provideDefaultRange()
51 | {
52 | return new TimeRange();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/GanttModelUIInformation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart;
19 |
20 |
21 | import com.jidesoft.gantt.DefaultGanttEntry;
22 | import com.jidesoft.gantt.GanttEntry;
23 | import com.jidesoft.grid.TreeTableModel;
24 | import com.jidesoft.scale.ScaleModel;
25 |
26 |
27 | /**
28 | * @param
29 | * the gantt data type, for example Date
or
30 | * Integer
.
31 | *
32 | * Used for entry scaling via {@link GanttEntry#getRange()}
33 | *
34 | * @author XDEV Software jwill
35 | * @since 4.0
36 | */
37 | public interface GanttModelUIInformation
38 | {
39 | /**
40 | * Sets a custom {@link ScaleModel} refered to the data type T
41 | * (see class description).
42 | *
43 | * @param scaleModel
44 | * the scalemodel which makes it possible to render the
45 | * {@link GanttEntry}s start and end.
46 | */
47 | public void setScaleModel(ScaleModel scaleModel);
48 |
49 |
50 | /**
51 | * Sets a custom {@link TreeTableModel}.
52 | *
53 | * @param treeTableModel
54 | * the {@link TreeTableModel} for advanced UI analytic support.
55 | */
56 | public void setTreeTableModel(TreeTableModel> treeTableModel);
57 |
58 |
59 | /**
60 | * Returns the {@link ScaleModel}.
61 | *
62 | * @return the {@link ScaleModel}
63 | */
64 | public ScaleModel getScaleModel();
65 |
66 |
67 | /**
68 | * Returns the customized {@link TreeTableModel}.
69 | *
70 | * @return the customized {@link TreeTableModel}
71 | */
72 | public TreeTableModel> getTreeTableModel();
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/GanttResourceBundle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart;
19 |
20 |
21 | import java.net.URL;
22 | import java.text.MessageFormat;
23 | import java.util.ResourceBundle;
24 |
25 | import javax.imageio.ImageIO;
26 | import javax.swing.ImageIcon;
27 |
28 |
29 | /**
30 | * Helper class for BI suite resource bundle.
31 | *
32 | * @author XDEV Software jwill
33 | * @since 4.0
34 | */
35 | public class GanttResourceBundle
36 | {
37 | /**
38 | * serialVersionUID.
39 | */
40 | private static ResourceBundle resourceBundle;
41 |
42 | /**
43 | * name of the language properties file.
44 | */
45 | private static final String BUNDLE_NAME = ".gantt";
46 |
47 |
48 | /**
49 | * @return the ResourceBundle for the calendar package
50 | */
51 | private static ResourceBundle getBundle()
52 | {
53 | if(resourceBundle == null)
54 | {
55 | resourceBundle = ResourceBundle.getBundle(GanttResourceBundle.class.getPackage()
56 | .getName() + BUNDLE_NAME);
57 | }
58 |
59 | return resourceBundle;
60 | }
61 |
62 |
63 | /**
64 | * Return a specified String from the bundle of the calendar.
65 | *
66 | * @param key
67 | * the key to lookup the value
68 | * @param args
69 | * optional values to replace the placeholder with
70 | * @return a String
71 | */
72 | public static String getString(String key, Object... args)
73 | {
74 | String str = getBundle().getString(key);
75 |
76 | if(args != null && args.length > 0)
77 | {
78 | str = MessageFormat.format(str,args);
79 | }
80 |
81 | return str;
82 | }
83 |
84 |
85 | public static ImageIcon loadResIcon(String name)
86 | {
87 | try
88 | {
89 | URL url = GanttResourceBundle.class.getResource("/xdev/ui/ganttchart/icons/" + name);
90 | return new ImageIcon(ImageIO.read(url));
91 | }
92 | catch(Exception e)
93 | {
94 | e.printStackTrace();
95 | return null;
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/IntegerRangeProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart;
19 |
20 |
21 | import com.jidesoft.range.IntegerRange;
22 | import com.jidesoft.range.Range;
23 |
24 |
25 | /**
26 | * Provides {@link IntegerRange}s prepared with given start and end values.
27 | *
28 | * @author XDEV Software jwill
29 | * @since 4.0
30 | */
31 | public class IntegerRangeProvider implements RangeProvider
32 | {
33 | /**
34 | * {@inheritDoc}
35 | */
36 | @Override
37 | public Range provideRange(Integer start, Integer end)
38 | {
39 | return new IntegerRange(start,end);
40 | }
41 |
42 |
43 | /**
44 | * {@inheritDoc}
45 | */
46 | @Override
47 | public Range provideDefaultRange()
48 | {
49 | return new IntegerRange();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/RangeProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart;
19 |
20 |
21 | import com.jidesoft.range.IntegerRange;
22 | import com.jidesoft.range.Range;
23 | import com.jidesoft.range.TimeRange;
24 |
25 |
26 | /**
27 | * Provides specific typed {@link Range}s prepared with given start and end
28 | * values.
29 | *
30 | *
31 | * @param
32 | * the range type to use.
33 | * @author XDEV Software jwill
34 | * @since 4.0
35 | *
36 | */
37 | public interface RangeProvider
38 | {
39 | /**
40 | * Provides a range with the given start and end delimiters.
41 | *
42 | * @param start
43 | * the range start value.
44 | * @param end
45 | * the range end value.
46 | *
47 | * @return the specific range, prepared with the given values.
48 | */
49 | public Range provideRange(T start, T end);
50 |
51 |
52 | /**
53 | * Provides a range with default values.
54 | *
55 | * See default constructors of the linked ranges.
56 | *
57 | *
58 | * @see {@link TimeRange} , {@link IntegerRange}
59 | *
60 | * @return the specific range, prepared with the given values.
61 | */
62 | public Range provideDefaultRange();
63 | }
64 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/XdevGanttEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart;
19 |
20 |
21 | import xdev.util.ObjectUtils;
22 |
23 | import com.jidesoft.gantt.DefaultGanttEntry;
24 | import com.jidesoft.range.Range;
25 |
26 |
27 | /**
28 | *
29 | *
30 | * @param
31 | *
32 | * @author XDEV Software jwill
33 | * @since 4.0
34 | */
35 | public class XdevGanttEntry extends DefaultGanttEntry implements UpdateableGanttEntry
36 | {
37 |
38 | private Object id;
39 | private Object root;
40 |
41 |
42 | public XdevGanttEntry(String description)
43 | {
44 | super(description);
45 | }
46 |
47 |
48 | public XdevGanttEntry(String description, Range range)
49 | {
50 | super(description,range);
51 | }
52 |
53 |
54 | public XdevGanttEntry(String description, Class rangeClass, Range range, double completion)
55 | {
56 | super(description,rangeClass,range,completion);
57 | }
58 |
59 |
60 | /**
61 | * {@inheritDoc}
62 | */
63 | @Override
64 | public void setId(Object id)
65 | {
66 | this.id = ObjectUtils.notNull(id);
67 | }
68 |
69 |
70 | /**
71 | * {@inheritDoc}
72 | */
73 | @Override
74 | public Object getId()
75 | {
76 | return this.id;
77 | }
78 |
79 |
80 | /**
81 | * {@inheritDoc}
82 | */
83 | @Override
84 | public void setRoot(Object root)
85 | {
86 | this.root = ObjectUtils.notNull(root);
87 | }
88 |
89 |
90 | /**
91 | * {@inheritDoc}
92 | */
93 | @Override
94 | public Object getRoot()
95 | {
96 | return this.root;
97 | }
98 |
99 | }
100 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/XdevVirtualTableGanttEntryCreator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart;
19 |
20 |
21 | import xdev.ui.ganttchart.model.XdevGanttEntryVTMappings;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 | import com.jidesoft.range.Range;
25 |
26 |
27 | /**
28 | * This concrete implementation of
29 | * {@link SpecialRelationalUpdatableEntryCreator} creates and returns
30 | * {@link XdevVirtualTableGanttEntry} instance, filled with the provided values.
31 | *
32 | *
33 | * @param
34 | * the gantt data type, for example Date
or
35 | * Integer
.
36 | *
37 | * Used for entry scaling via {@link GanttEntry#getRange()}
38 | *
39 | *
40 | * @author XDEV Software jwill
41 | * @since 4.0
42 | */
43 | public class XdevVirtualTableGanttEntryCreator implements
44 | SpecialRelationalUpdatableEntryCreator, T>
45 | {
46 | /**
47 | * {@inheritDoc}
48 | */
49 | @Override
50 | public UpdateableGanttEntry createRelationalUpdatableEntry(String description,
51 | Range range, XdevGanttEntryVTMappings dataInfo)
52 | {
53 | return new XdevVirtualTableGanttEntry(description,range,dataInfo,
54 | dataInfo.getVirtualTable());
55 | }
56 |
57 |
58 | /**
59 | * {@inheritDoc}
60 | */
61 | @Override
62 | public UpdateableGanttEntry createRelationalUpdatableEntry(String description,
63 | Double completion, Range range, XdevGanttEntryVTMappings dataInfo)
64 | {
65 | return new XdevVirtualTableGanttEntry(description,range,completion,dataInfo,
66 | dataInfo.getVirtualTable());
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/AbstractRelationManagementStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttChart;
24 | import com.jidesoft.gantt.GanttEntryRelation;
25 | import com.jidesoft.gantt.GanttModel;
26 |
27 |
28 | /**
29 | *
30 | *
31 | *
32 | * @param
33 | * @param
34 | *
35 | * @author XDEV Software jwill
36 | * @since 4.0
37 | */
38 | public abstract class AbstractRelationManagementStrategy>
39 | implements GanttRelationManagementStrategy
40 | {
41 | /**
42 | * Initially validates the existing relations within the {@link GanttChart}.
43 | *
44 | * @param model
45 | * the Chart
to validate.
46 | */
47 | public AbstractRelationManagementStrategy(GanttModel model)
48 | {
49 | // validate relations
50 | for(int i = 0; i < model.getEntryCount(); i++)
51 | {
52 | for(GanttEntryRelation relation : model.getGanttEntryRelationModel()
53 | .getEntryRelations(model.getEntryAt(i)))
54 | {
55 | this.manageRelation(relation);
56 | }
57 | }
58 | }
59 |
60 |
61 | public AbstractRelationManagementStrategy()
62 | {
63 | super();
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/DefaultRelationUpdateValidationStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 | import com.jidesoft.gantt.GanttEntryRelation;
25 |
26 |
27 | /**
28 | * The concrete implementation of {@link GanttRelationValidationStrategy} which
29 | * is just an empty default wrapper.
30 | *
31 | *
32 | *
33 | * @param
34 | * the customized {@link GanttEntry} type.
35 | *
36 | * @param
37 | * the gantt data type, for example Date
or
38 | * Integer
. Has to extend {@link Comparable} for
39 | * validation purpose.
40 | *
41 | * Used for entry scaling via {@link GanttEntry#getRange()}
42 | *
43 | *
44 | * @author XDEV Software jwill
45 | * @since 4.0
46 | */
47 | public class DefaultRelationUpdateValidationStrategy, S extends UpdateableGanttEntry>
48 | implements GanttRelationValidationStrategy
49 | {
50 | private GanttRelationManagementStrategy relationManagementStrategy;
51 |
52 |
53 | /**
54 | * {@inheritDoc}
55 | */
56 | @Override
57 | public boolean validateRelation(GanttEntryRelation relation)
58 | {
59 | // default implementation uses default rules
60 | return this.getGanttEntryRelationManagementStrategy().manageRelation(relation);
61 | }
62 |
63 |
64 | /**
65 | * {@inheritDoc}
66 | */
67 | @Override
68 | public void setGanttEntryRelationManagementStrategy(
69 | GanttRelationManagementStrategy strategy)
70 | {
71 | this.relationManagementStrategy = strategy;
72 | }
73 |
74 |
75 | /**
76 | * {@inheritDoc}
77 | */
78 | @Override
79 | public GanttRelationManagementStrategy getGanttEntryRelationManagementStrategy()
80 | {
81 | if(this.relationManagementStrategy == null)
82 | {
83 | return new UIRelationManagementStrategy();
84 | }
85 | else
86 | {
87 | return this.relationManagementStrategy;
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/DefaultRelationValidationStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 | import com.jidesoft.gantt.GanttEntryRelation;
25 |
26 |
27 | /**
28 | * The concrete implementation of {@link GanttRelationValidationStrategy} which
29 | * is just an empty default wrapper.
30 | *
31 | *
32 | *
33 | * @param
34 | * the customized {@link GanttEntry} type.
35 | *
36 | * @param
37 | * the gantt data type, for example Date
or
38 | * Integer
. Has to extend {@link Comparable} for
39 | * validation purpose.
40 | *
41 | * Used for entry scaling via {@link GanttEntry#getRange()}
42 | *
43 | *
44 | * @author XDEV Software jwill
45 | * @since 4.0
46 | */
47 | public class DefaultRelationValidationStrategy, S extends UpdateableGanttEntry>
48 | implements GanttRelationValidationStrategy
49 | {
50 | private GanttRelationManagementStrategy relationManagementStrategy;
51 |
52 |
53 | /**
54 | * {@inheritDoc}
55 | */
56 | @Override
57 | public boolean validateRelation(GanttEntryRelation relation)
58 | {
59 | // default implementation uses default rules
60 | return this.getGanttEntryRelationManagementStrategy().manageRelation(relation);
61 | }
62 |
63 |
64 | /**
65 | * {@inheritDoc}
66 | */
67 | @Override
68 | public void setGanttEntryRelationManagementStrategy(
69 | GanttRelationManagementStrategy strategy)
70 | {
71 | this.relationManagementStrategy = strategy;
72 | }
73 |
74 |
75 | /**
76 | * {@inheritDoc}
77 | */
78 | @Override
79 | public GanttRelationManagementStrategy getGanttEntryRelationManagementStrategy()
80 | {
81 | if(this.relationManagementStrategy == null)
82 | {
83 | return new UIRelationManagementStrategy();
84 | }
85 | else
86 | {
87 | return this.relationManagementStrategy;
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/FtFRelationManagementController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 |
25 |
26 | /**
27 | *
28 | * Validates Finish to Finish GanttEntryRelationships.
29 | *
30 | * @param
31 | * the customized {@link GanttEntry} type.
32 | *
33 | * @param
34 | * the gantt data type, for example Date
or
35 | * Integer
. Has to extend {@link Comparable} for
36 | * validation purpose.
37 | *
38 | * Used for entry scaling via {@link GanttEntry#getRange()}
39 | *
40 | *
41 | * @author XDEV Software JWill
42 | * @since 4.0
43 | */
44 | public class FtFRelationManagementController, S extends UpdateableGanttEntry>
45 | implements GanttRelationManagementController
46 | {
47 |
48 | @Override
49 | public boolean validateEntryRelation(S precessor, S sucessor)
50 | {
51 | // sucessor finish must be after or equals the precessor finish
52 | if(sucessor.getRange().upper().compareTo(precessor.getRange().upper()) >= 0)
53 | {
54 | return true;
55 | }
56 |
57 | return false;
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/FtSRelationManagementController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 |
25 |
26 | /**
27 | * Validates Finish to Start GanttEntryRelationships.
28 | *
29 | * @param
30 | * the customized {@link GanttEntry} type. .
31 | *
32 | * @param
33 | * the gantt data type, for example Date
or
34 | * Integer
. Has to extend {@link Comparable} for
35 | * validation purpose.
36 | *
37 | * Used for entry scaling via {@link GanttEntry#getRange()}
38 | *
39 | *
40 | * @author XDEV Software jwill
41 | * @since 4.0
42 | */
43 | public class FtSRelationManagementController, S extends UpdateableGanttEntry>
44 | implements GanttRelationManagementController
45 | {
46 | /**
47 | * {@inheritDoc}
48 | */
49 | @Override
50 | public boolean validateEntryRelation(S precessor, S sucessor)
51 | {
52 | // precessor finish must be lower then sucessor entries start
53 | if(precessor.getRange().upper().compareTo(sucessor.getRange().lower()) <= 0)
54 | {
55 | return true;
56 | }
57 | return false;
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/GanttDateScaleAreaUpdater.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import java.util.Date;
22 | import java.util.List;
23 |
24 | import xdev.ui.ganttchart.UpdateableGanttEntry;
25 | import xdev.ui.ganttchart.utils.XdevGanttUtils;
26 |
27 | import com.jidesoft.gantt.GanttModel;
28 | import com.jidesoft.gantt.GanttModelEvent;
29 | import com.jidesoft.gantt.GanttModelListener;
30 | import com.jidesoft.scale.ScaleArea;
31 |
32 |
33 | /**
34 | *
35 | * @author XDEV Software jwill
36 | * @since 4.0
37 | */
38 | public class GanttDateScaleAreaUpdater implements GanttModelListener
39 | {
40 |
41 | private GanttModel> model;
42 | private ScaleArea dateScaleArea;
43 |
44 |
45 | public GanttDateScaleAreaUpdater(GanttModel> model,
46 | ScaleArea dateScaleArea)
47 | {
48 | this.model = model;
49 | this.dateScaleArea = dateScaleArea;
50 | }
51 |
52 |
53 | /**
54 | * {@inheritDoc}
55 | */
56 | @Override
57 | public void ganttChartChanged(GanttModelEvent arg0)
58 | {
59 | if(model.getEntryAt(arg0.getFirstRow()) != null)
60 | {
61 | if(!model.getEntryAt(arg0.getFirstRow()).isAdjusting())
62 | {
63 | List> entries = XdevGanttUtils.getEntries(this.model);
64 |
65 | Date minRange = XdevGanttUtils.getMinDate(entries);
66 | Date maxRange = XdevGanttUtils.getMaxDate(entries);
67 |
68 | if(arg0.getType() != GanttModelEvent.UPDATE)
69 | {
70 | this.dateScaleArea.setStart(minRange);
71 | this.dateScaleArea.setEnd(maxRange);
72 | }
73 | }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/GanttEntryController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 | import com.jidesoft.gantt.GanttEntryRelation;
25 | import com.jidesoft.gantt.GanttModelEvent;
26 |
27 |
28 | /**
29 | * Delegates {@link GanttModelEvent} actions.
30 | *
31 | *
32 | * @param
33 | * the gantt data type, for example Date
or
34 | * Integer
.
35 | *
36 | * Used for entry scaling via {@link GanttEntry#getRange()}
37 | *
38 | *
39 | * @param
40 | * the customized {@link GanttEntry} type.
41 | *
42 | * @author XDEV Software JWill
43 | * @since 4.0
44 | */
45 | public interface GanttEntryController>
46 | {
47 | /**
48 | * Handles the proper update of the given {@link GanttEntry}.
49 | *
50 | * Also takes care of the {@link GanttEntry} range restrictions through
51 | * {@link GanttEntryRelation}s, if a {@link GanttRelationValidationStrategy}
52 | * is set.
53 | *
54 | *
55 | *
56 | * @param entry
57 | * the {@link GanttEntry} to update.
58 | */
59 | public void updateEntry(S entry);
60 |
61 |
62 | /**
63 | * Handles the propper deletion of the given {@link GanttEntry}.
64 | *
65 | * @param entry
66 | * the {@link GanttEntry} to delete.
67 | */
68 | public void removeEntry(S entry);
69 |
70 |
71 | /**
72 | * Handles the propper insertion of the given {@link GanttEntry}.
73 | *
74 | * @param entry
75 | * the {@link GanttEntry} to insert.
76 | */
77 | public void insertEntry(S entry);
78 |
79 |
80 | /**
81 | * @param relationValidationStrategy
82 | * the {@link GanttRelationValidationStrategy} to set.
83 | */
84 | public void setRelationValidationStrategy(
85 | GanttRelationValidationStrategy relationValidationStrategy);
86 |
87 |
88 | /**
89 | * @return the {@link GanttRelationValidationStrategy}.
90 | */
91 | public GanttRelationValidationStrategy getRelationValidationStrategy();
92 |
93 | }
94 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/GanttEntryRelationManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 |
24 | /**
25 | *
26 | *
27 | * @param
28 | * @param
29 | *
30 | * @author jwill
31 | * @since 4.0
32 | */
33 | public interface GanttEntryRelationManager>
34 | {
35 | public void setGanttEntryRelationManagementStrategy(
36 | GanttRelationManagementStrategy strategy);
37 |
38 |
39 | public GanttRelationManagementStrategy getGanttEntryRelationManagementStrategy();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/GanttRelationManagementController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 | import xdev.ui.ganttchart.model.GanttRelationPersistence;
23 |
24 | import com.jidesoft.gantt.GanttEntry;
25 |
26 |
27 | /**
28 | * This is the controller layer between {@link GanttRelationPersistence} and the
29 | * GanttChart relation view.
30 | *
31 | *
32 | * If the upcoming GanttRelations aren�t legal, special implementation details
33 | * notify the user about the mistake.
34 | *
35 | *
36 | * @param
37 | * the gantt data type, for example Date
or
38 | * Integer
.
39 | *
40 | * Used for entry scaling via {@link GanttEntry#getRange()}
41 | *
42 | *
43 | * @param
44 | * the customized {@link GanttEntry} type.
45 | *
46 | * @author XDEV Software jwill
47 | * @since 4.0
48 | *
49 | * @see GanttRelationValidationStrategy
50 | *
51 | */
52 | public interface GanttRelationManagementController, S extends UpdateableGanttEntry>
53 | {
54 | /**
55 | * Validates the upcomming entry relationship.
56 | *
57 | * Concrete implementations like {@link StSRelationManagementController}
58 | * verify the entries start and end
59 | *
60 | *
61 | * @param precessor
62 | * the precessor entry of the relationship.
63 | * @param sucessor
64 | * the sucessor entry of the relationship.
65 | * @return returns the validation boolean.
66 | *
67 | * @see FtFRelationManagementController
68 | * @see StFRelationManagementController
69 | */
70 | public boolean validateEntryRelation(S precessor, S sucessor);
71 | }
72 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/GanttRelationManagementStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import com.jidesoft.gantt.GanttEntryRelation;
22 |
23 | import xdev.ui.ganttchart.UpdateableGanttEntry;
24 |
25 |
26 | /**
27 | * Gantt relation management strategy which determines how invalid gantt
28 | * relations are handled.
29 | *
30 | *
31 | * @param
32 | * @param
33 | *
34 | * @see UIRelationManagementStrategy
35 | * @see UpdateDateRelationManagementStrategy
36 | *
37 | * @author XDEV Software jwill
38 | * @since 4.0
39 | */
40 | public interface GanttRelationManagementStrategy>
41 | {
42 | public boolean manageRelation(GanttEntryRelation relation);
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/GanttRelationValidationStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 | import com.jidesoft.gantt.GanttEntryRelation;
25 |
26 |
27 | /**
28 | * Notifies the user whether the relation validation failed or succeeded.
29 | *
30 | * This is the position where the user can determine his own relation rules or
31 | * adapt existing relation rules.
32 | *
33 | *
34 | * @param
35 | * the gantt data type, for example Date
or
36 | * Integer
. Has to extend {@link Comparable} for
37 | * validation purpose.
38 | *
39 | * Used for entry scaling via {@link GanttEntry#getRange()}
40 | *
41 | * @param
42 | * the customized {@link GanttEntry} type.
43 | *
44 | * @author XDEV Software jwill
45 | * @since 4.0
46 | *
47 | * @see StSRelationManagementController
48 | * @see StFRelationManagementController
49 | * @see FtFRelationManagementController
50 | * @see FtSRelationManagementController
51 | */
52 | public interface GanttRelationValidationStrategy> extends
53 | GanttEntryRelationManager
54 | {
55 | /**
56 | * Validates each upcoming relation case.
57 | *
58 | * @param relation
59 | * the {@link GanttEntryRelation} to validate.
60 | * @return whether the validation was successfull.
61 | */
62 | public boolean validateRelation(GanttEntryRelation relation);
63 | }
64 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/GanttTemplateRemoveKeyAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import java.awt.event.KeyAdapter;
22 | import java.awt.event.KeyEvent;
23 | import java.util.ArrayList;
24 | import java.util.Collections;
25 | import java.util.List;
26 |
27 | import xdev.db.DBException;
28 | import xdev.ui.UIUtils;
29 | import xdev.ui.UIUtils.MessageDialogType;
30 | import xdev.ui.ganttchart.template.XdevGanttTemplate;
31 | import xdev.util.res.ResourceUtils;
32 | import xdev.vt.VirtualTableException;
33 |
34 |
35 | /**
36 | *
37 | * @author XDEV Software jwill
38 | * @since 4.0
39 | */
40 | public class GanttTemplateRemoveKeyAdapter extends KeyAdapter
41 | {
42 | private final XdevGanttTemplate template;
43 |
44 |
45 | public GanttTemplateRemoveKeyAdapter(XdevGanttTemplate template)
46 | {
47 | this.template = template;
48 | }
49 |
50 |
51 | public void keyPressed(KeyEvent e)
52 | {
53 | if(e.getKeyChar() == '\u007F')
54 | {
55 | List s = new ArrayList();
56 | Collections.addAll(s,
57 | ResourceUtils.getResourceString("Y",GanttTemplateRemoveKeyAdapter.class),
58 | ResourceUtils.getResourceString("N",GanttTemplateRemoveKeyAdapter.class));
59 | Object confirmation = UIUtils.showConfirmMessage(
60 | ResourceUtils.getResourceString("Title",GanttTemplateRemoveKeyAdapter.class),
61 | ResourceUtils.getResourceString("Message",GanttTemplateRemoveKeyAdapter.class),
62 | s,0,MessageDialogType.WARNING_MESSAGE);
63 | if(confirmation != null)
64 | {
65 | if(confirmation.equals(ResourceUtils.getResourceString("Y",
66 | GanttTemplateRemoveKeyAdapter.class)))
67 | {
68 | try
69 | {
70 | template.getSelectedVirtualTableRow().delete(
71 | template.isPersistenceEnabled());
72 | }
73 | catch(VirtualTableException e1)
74 | {
75 | e1.printStackTrace();
76 | }
77 | catch(DBException e1)
78 | {
79 | e1.printStackTrace();
80 | }
81 | }
82 | }
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/StFRelationManagementController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 |
25 |
26 | /**
27 | * Validates Start to Finish GanttEntryRelationships.
28 | *
29 | *
30 | *
31 | * @param
32 | * the gantt data type, for example Date
or
33 | * Integer
. Has to extend {@link Comparable} for
34 | * validation purpose.
35 | *
36 | * Used for entry scaling via {@link GanttEntry#getRange()}.
37 | *
38 | *
39 | * @param
40 | * the customized {@link GanttEntry} type.
41 | *
42 | * @author XDEV Software jwill
43 | * @since 4.0
44 | */
45 | public class StFRelationManagementController, S extends UpdateableGanttEntry>
46 | implements GanttRelationManagementController
47 | {
48 | /**
49 | * {@inheritDoc}
50 | */
51 | @Override
52 | public boolean validateEntryRelation(S precessor, S sucessor)
53 | {
54 | // sucessor must be end after precessor has started
55 | if(sucessor.getRange().upper().compareTo(precessor.getRange().lower()) >= 0)
56 | {
57 | return true;
58 | }
59 |
60 | return false;
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/action/StSRelationManagementController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.action;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttEntry;
24 |
25 |
26 | /**
27 | * Validates Start to Start GanttEntryRelationships.
28 | *
29 | * @param
30 | * the gantt data type, for example Date
or
31 | * Integer
. Has to extend {@link Comparable} for
32 | * validation purpose.
33 | *
34 | * Used for entry scaling via {@link GanttEntry#getRange()}.
35 | *
36 | *
37 | * @param
38 | * the customized {@link GanttEntry} type.
39 | *
40 | * @author XDEV Software jwill
41 | * @since 4.0
42 | */
43 | public class StSRelationManagementController, S extends UpdateableGanttEntry>
44 | implements GanttRelationManagementController
45 | {
46 | /**
47 | * {@inheritDoc}
48 | */
49 | @Override
50 | public boolean validateEntryRelation(S precessor, S sucessor)
51 | {
52 | // precessor must be equals or greater then the sucessor start
53 | if(precessor.getRange().lower().compareTo(sucessor.getRange().lower()) <= 0)
54 | {
55 | return true;
56 | }
57 | return false;
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/editor/GanttTemplateCustomMenuTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.editor;
19 |
20 |
21 | import xdev.ui.DefaultAction;
22 | import xdev.ui.XdevMenu;
23 | import xdev.ui.XdevMenuItem;
24 | import xdev.ui.ganttchart.GanttResourceBundle;
25 |
26 | import com.jidesoft.gantt.GanttEntry;
27 |
28 |
29 | /**
30 | * Default implementation for {@link GanttChartTemplateTablePopup}.
31 | *
32 | * @author XDEV Software jwill
33 | *
34 | * @param
35 | * the customized {@link GanttEntry} type. .
36 | *
37 | * @param
38 | * the gantt data type, for example Date
or
39 | * Integer
. Has to extend {@link Comparable} for
40 | * validation purpose.
41 | *
42 | * Used for entry scaling via {@link GanttEntry#getRange()}
43 | *
44 | */
45 | public class GanttTemplateCustomMenuTest extends XdevMenu
46 | {
47 | /**
48 | *
49 | */
50 | private static final long serialVersionUID = -7992140390585736584L;
51 |
52 | /**
53 | * the default description for table popup menuitem - NEW.
54 | */
55 | public static final String TABLE_POPUP_MENUITEM_NEW_DESCRIPTION = GanttResourceBundle
56 | .getString(
57 | "viewUpdater.tablenew",
58 | GanttTemplateCustomMenuTest.class);
59 |
60 | /**
61 | * the default description for table popup menuitem - DELETE.
62 | */
63 | public static final String TABLE_POPUP_MENUITEM_DELETE_DESCRIPTION = GanttResourceBundle
64 | .getString(
65 | "viewUpdater.tabledelete",
66 | GanttTemplateCustomMenuTest.class);
67 |
68 | private XdevMenuItem menuItem2;
69 |
70 |
71 | /**
72 | *
73 | * @param chart
74 | * the chart to observe.
75 | * @param support
76 | * the support, for example to provide a new {@link GanttEntry}.
77 | */
78 | public GanttTemplateCustomMenuTest()
79 | {
80 | super();
81 | this.setText("Custom menu");
82 | menuItem2 = new XdevMenuItem(new DefaultAction("Custom stuff",null,null,null,true));
83 | this.add(menuItem2);
84 | }
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/editor/XdevGanttChartPopupMenuInstaller.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.editor;
19 |
20 |
21 | import java.awt.Rectangle;
22 | import java.awt.event.MouseEvent;
23 |
24 | import javax.swing.JMenu;
25 | import javax.swing.JPopupMenu;
26 |
27 | import com.jidesoft.gantt.GanttChart;
28 | import com.jidesoft.gantt.GanttChartPopupMenuInstaller;
29 |
30 |
31 | public class XdevGanttChartPopupMenuInstaller extends GanttChartPopupMenuInstaller
32 | {
33 |
34 | private JMenu menu;
35 |
36 |
37 | public XdevGanttChartPopupMenuInstaller(GanttChart, ?> chart)
38 | {
39 | super(chart);
40 | }
41 |
42 |
43 | public XdevGanttChartPopupMenuInstaller(GanttChart, ?> chart, JMenu menu)
44 | {
45 | super(chart);
46 | this.menu = menu;
47 | }
48 |
49 |
50 | @Override
51 | public void mousePressed(MouseEvent e)
52 | {
53 | showPopup(e);
54 | }
55 |
56 |
57 | @Override
58 | public void mouseReleased(MouseEvent e)
59 | {
60 | showPopup(e);
61 | }
62 |
63 |
64 | private void showPopup(final MouseEvent e)
65 | {
66 | if(!e.isPopupTrigger())
67 | {
68 | return;
69 | }
70 |
71 | GanttChart, ?> ganttChart = (GanttChart, ?>)e.getComponent();
72 |
73 | JPopupMenu popup = createPopupMenu();
74 |
75 | if(this.menu != null)
76 | {
77 | popup.add(this.menu);
78 | }
79 |
80 | int clickingRow = ganttChart.rowAtPoint(e.getPoint());
81 | Rectangle entryRect = ganttChart.getEntryRect(clickingRow);
82 | if(entryRect != null)
83 | {
84 | customizeMenuItems(ganttChart,popup,clickingRow,entryRect.getLocation());
85 | if(popup.getComponentCount() > 0)
86 | {
87 | popup.show(
88 | ganttChart,
89 | entryRect.getBounds().x
90 | - (int)Math.round(popup.getPreferredSize().getWidth()),
91 | entryRect.getBounds().y);
92 | }
93 | }
94 | else
95 | {
96 | customizeMenuItems(ganttChart,popup,clickingRow,e.getPoint());
97 | if(popup.getComponentCount() > 0)
98 | {
99 | popup.show(ganttChart,e.getX(),e.getY());
100 | }
101 | }
102 | }
103 |
104 | }
105 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/model/GanttEntryMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.model;
19 |
20 |
21 | import xdev.ui.ganttchart.DateRangeProvider;
22 | import xdev.ui.ganttchart.IntegerRangeProvider;
23 | import xdev.ui.ganttchart.RangeProvider;
24 | import xdev.vt.VirtualTable;
25 | import xdev.vt.VirtualTable.VirtualTableRow;
26 |
27 | import com.jidesoft.gantt.GanttEntry;
28 | import com.jidesoft.gantt.GanttModel;
29 |
30 |
31 | /**
32 | * Maps a {@link VirtualTableRow} to a {@link GanttEntry}.
33 | *
34 | * Used to create a {@link GanttModel} from an existing {@link VirtualTable}.
35 | *
36 | *
37 | *
38 | * @param
39 | * the mapping source type for example {@link VirtualTableRow}
40 | * @param
41 | * the {@link GanttEntry} type, also can be a customized
42 | * implementation.
43 | *
44 | * @param
45 | * the gantt charts data type, for example Date
or
46 | * Integer
.
47 | *
48 | * @author XDEV Software jwill
49 | * @since 4.0
50 | */
51 | public interface GanttEntryMapper
52 | {
53 |
54 | /**
55 | * Maps a target object of type {@code T} to an {@link GanttEntry}.
56 | *
57 | * @param input
58 | * the object to create an {@link GanttEntry} from.
59 | * @return an {@link Activity}
60 | */
61 | public S dataToGanttEntry(T input);
62 |
63 |
64 | /**
65 | * Retruns a concrete {@link RangeProvider} related to the GanttChart data
66 | * type.
67 | *
68 | * @return the concrete RangeProvider
.
69 | *
70 | * @see DateRangeProvider
71 | * @see IntegerRangeProvider
72 | */
73 | public RangeProvider getRangeProvider();
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/model/GanttPersistence.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.model;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttChart;
24 | import com.jidesoft.gantt.GanttEntry;
25 |
26 |
27 | /**
28 | * This is the {@link GanttChart}s persistence layer, which is responsible for
29 | * all changes made to its {@link GanttEntry}s.
30 | *
31 | * Changes like add, update and delte are committed to a datasource.
32 | *
33 | *
34 | *
35 | * @param
36 | * data type, for example Date
or Integer
.
37 | * @param
38 | * the custom {@link GanttEntry} type.
39 | *
40 | * @author XDEV Software jwill
41 | * @since 4.0
42 | */
43 | public interface GanttPersistence>
44 | {
45 | /**
46 | * Updates the {@link GanttEntry}s changes in a data source.
47 | *
48 | * @param entry
49 | * the enty to update.
50 | */
51 | public void updateEntry(S entry);
52 |
53 |
54 | /**
55 | * Adds the new {@link GanttEntry} to a data source.
56 | *
57 | * @param entry
58 | * the entry to add.
59 | */
60 | public void addEntry(S entry);
61 |
62 |
63 | /**
64 | * Removes the {@link GanttEntry} from a data source.
65 | *
66 | * @param entry
67 | * the entry to remove.
68 | */
69 | public void removeEntry(S entry);
70 | }
71 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/model/GanttRelationPersistence.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.model;
19 |
20 |
21 | import xdev.ui.ganttchart.UpdateableGanttEntry;
22 |
23 | import com.jidesoft.gantt.GanttChart;
24 | import com.jidesoft.gantt.GanttEntry;
25 | import com.jidesoft.gantt.GanttEntryRelation;
26 |
27 |
28 | /**
29 | * This persistence is responsible for transmitting all changes within the
30 | * {@link GanttChart} or implicitly its {@link GanttEntryRelation}s to a data
31 | * source.
32 | *
33 | * @param
34 | * the customized {@link GanttEntry} type.
35 | *
36 | * @author XDEV Software jwill
37 | * @since 4.0
38 | */
39 | public interface GanttRelationPersistence>
40 | {
41 | /**
42 | * Adds the given relation the the data source.
43 | *
44 | * @param relation
45 | * the {@link GanttEntryRelation} to add.
46 | */
47 | public void addRelation(GanttEntryRelation relation);
48 |
49 |
50 | /**
51 | * Removes the given relation from the data source.
52 | *
53 | * @param relation
54 | * the relation to remove.
55 | */
56 | public void removeRelation(GanttEntryRelation relation);
57 | }
58 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/model/XdevGanttEntryRelationModel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.model;
19 |
20 |
21 | import java.util.Set;
22 |
23 | import com.jidesoft.gantt.DefaultGanttEntryRelationModel;
24 | import com.jidesoft.gantt.GanttEntry;
25 | import com.jidesoft.gantt.GanttEntryRelation;
26 | import com.jidesoft.gantt.GanttEntryRelationModel;
27 |
28 | import xdev.ui.ganttchart.UpdateableGanttEntry;
29 |
30 |
31 | /**
32 | * Workaround implementation for JIDES {@link GanttEntryRelationModel} because
33 | * no event is fired on entry removal.
34 | *
35 | *
36 | * @param
37 | * the gantt data type, for example Date
or
38 | * Integer
.
39 | *
40 | * Used for entry scaling via {@link GanttEntry#getRange()}
41 | *
42 | * @param
43 | * the customized {@link GanttEntry} type.
44 | *
45 | * @author XDEV Software jwill
46 | * @since 4.0
47 | */
48 | public class XdevGanttEntryRelationModel> extends
49 | DefaultGanttEntryRelationModel
50 | {
51 | /**
52 | * the serialization id.
53 | */
54 | private static final long serialVersionUID = 1514636929819934463L;
55 |
56 |
57 | /**
58 | * Initializes {@link GanttEntryRelationModel} with default constructor.
59 | */
60 | public XdevGanttEntryRelationModel()
61 | {
62 | super();
63 | }
64 |
65 |
66 | /**
67 | * {@inheritDoc}
68 | */
69 | @Override
70 | public void removeEntryRelation(final GanttEntryRelation paramGanttEntryRelation)
71 | {
72 | if(paramGanttEntryRelation == null)
73 | {
74 | return;
75 | }
76 | final Set> localSet1 = this._relations.get(paramGanttEntryRelation.getPredecessorEntry());
77 | final Set> localSet2 = this._relations.get(paramGanttEntryRelation.getSuccessorEntry());
78 | if(localSet1 != null)
79 | {
80 | localSet1.remove(paramGanttEntryRelation);
81 | }
82 | if(localSet2 != null)
83 | {
84 | localSet2.remove(paramGanttEntryRelation);
85 | }
86 |
87 | this.fireGanttEntryRealtionRemoved(paramGanttEntryRelation);
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/model/XdevGanttModelUIInformation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.model;
19 |
20 |
21 | import xdev.ui.ganttchart.GanttModelUIInformation;
22 |
23 | import com.jidesoft.gantt.DefaultGanttEntry;
24 | import com.jidesoft.gantt.GanttEntry;
25 | import com.jidesoft.grid.TreeTableModel;
26 | import com.jidesoft.scale.ScaleModel;
27 |
28 |
29 | /**
30 | * This concrete {@link GanttModelUIInformation} implementation stores a
31 | * {@link ScaleModel} and a {@link TreeTableModel} to upgrade the UI on demand.
32 | *
33 | * @author XDEV Software jwill
34 | * @since 4.0
35 | *
36 | * @param
37 | * the gantt data type, for example Date
or
38 | * Integer
.
39 | *
40 | * Used for entry scaling via {@link GanttEntry#getRange()}
41 | *
42 | */
43 | public class XdevGanttModelUIInformation implements GanttModelUIInformation
44 | {
45 |
46 | /**
47 | * a custom {@link TreeTableModel}.
48 | */
49 | private TreeTableModel> treeTableModel;
50 |
51 | /**
52 | * a custom data type based {@link ScaleModel}.
53 | */
54 | private ScaleModel scaleModel;
55 |
56 |
57 | /**
58 | * {@inheritDoc}
59 | */
60 | public ScaleModel getScaleModel()
61 | {
62 | return this.scaleModel;
63 | }
64 |
65 |
66 | /**
67 | * {@inheritDoc}
68 | */
69 | public TreeTableModel> getTreeTableModel()
70 | {
71 | return treeTableModel;
72 | }
73 |
74 |
75 | /**
76 | * {@inheritDoc}
77 | */
78 | public void setScaleModel(ScaleModel scaleModel)
79 | {
80 | this.scaleModel = scaleModel;
81 | }
82 |
83 |
84 | /**
85 | * {@inheritDoc}
86 | */
87 | public void setTreeTableModel(TreeTableModel> treeTableModel)
88 | {
89 | this.treeTableModel = treeTableModel;
90 | }
91 |
92 | }
93 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/template/ComponentSplitHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.template;
19 |
20 |
21 | import java.awt.Component;
22 | import java.awt.event.ContainerListener;
23 |
24 | import com.jidesoft.gantt.GanttChart;
25 | import com.jidesoft.grid.TreeTable;
26 | import com.jidesoft.swing.JideSplitPane;
27 |
28 |
29 | /**
30 | * Manages the runtime fragmentation of a {@link AbstractGanttTemplate}.
31 | *
32 | * GanttChartTemplate is a vertical divided SplitPane
which stores
33 | * a {@link TreeTable} and a {@link GanttChart} by default.
34 | *
35 | *
36 | *
37 | *
38 | * Enables the user to:
39 | * split up the template
40 | * get the split off component for restoring
41 | *
42 | *
43 | *
44 | * @author XDEV Software jwill
45 | * @since 4.0
46 | */
47 | public interface ComponentSplitHandler
48 | {
49 | /**
50 | * Splits of the given component from the GanttTemplate.
51 | *
52 | * @param component
53 | * the Component
to split off.
54 | *
55 | * @see ContainerListener
56 | * @see JideSplitPane#componentRemoved(java.awt.event.ContainerEvent)
57 | */
58 | public void splitAtComponent(Component component);
59 |
60 |
61 | /**
62 | * Splits off the according component at the given index from the
63 | * GanttTemplate.
64 | *
65 | * @param index
66 | * the component index, which indicates the component to split
67 | * off.
68 | *
69 | * @see ContainerListener
70 | * @see JideSplitPane#componentRemoved(java.awt.event.ContainerEvent)
71 | */
72 | public void splitAtIndex(int index);
73 |
74 |
75 | /**
76 | * /** Restores latest removed component from the template. Adds the
77 | * component at the given layout index.
78 | *
79 | * @param index
80 | * the layout index to add the component.
81 | */
82 | public void restoreAtIndex(int index);
83 |
84 |
85 | /**
86 | * Returns the split off component to restore it.
87 | *
88 | * @see JideSplitPane#addPane(Component)
89 | *
90 | * @return a previously split off component.
91 | */
92 | public Component getSeveredComponent();
93 | }
94 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/template/SplitableComponent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.template;
19 |
20 |
21 | import com.jidesoft.gantt.GanttChartPane;
22 |
23 |
24 | /**
25 | * Component which defines the ability to detach parts of itself.
26 | *
27 | * @since 4.0
28 | * @author XDEV Software jwill
29 | */
30 | public interface SplitableComponent
31 | {
32 | /**
33 | * Sets the {@link ComponentSplitHandler} that understands to split the
34 | * {@link GanttChartPane}s UI.
35 | *
36 | * A common use case would be for example the seperation of the
37 | * TreeTable
from the GanttChart
38 | *
39 | *
40 | * @param splitHandler
41 | * the split handler to use.
42 | */
43 | public void setComponentSplitHandler(ComponentSplitHandler splitHandler);
44 |
45 |
46 | /**
47 | * Returns the {@link ComponentSplitHandler} that understands to split the
48 | * {@link GanttChartPane}s UI.
49 | *
50 | * @return the splitHandler which is currently used.
51 | */
52 | public ComponentSplitHandler getComponentSplitHandler();
53 | }
54 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/utils/VTGanttRelationMappingConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.utils;
19 |
20 |
21 | import java.util.Map;
22 |
23 | import xdev.ui.ganttchart.model.XdevGanttRelationVTWrapper;
24 | import xdev.vt.VirtualTable;
25 | import xdev.vt.VirtualTableColumn;
26 |
27 |
28 | public class VTGanttRelationMappingConverter
29 | {
30 | public static XdevGanttRelationVTWrapper getEntryRelationColumnMappings(
31 | Map> relationMappings,
32 | VirtualTable relationVT)
33 | {
34 |
35 | XdevGanttRelationVTWrapper relationDataContainer = new XdevGanttRelationVTWrapper(
36 | relationVT);
37 |
38 | for(GanttRelationColumnType mandatoryType : GanttRelationColumnType.getMandatoryTypes())
39 | {
40 | if(!relationMappings.containsKey(mandatoryType))
41 | {
42 | throw new NullPointerException(
43 | "Missing mandatory gantt relation data mapping parameter");
44 | }
45 | }
46 |
47 | VirtualTableColumn> idColumn = relationMappings.get(GanttRelationColumnType.ID);
48 | relationDataContainer.setId(idColumn);
49 |
50 | @SuppressWarnings("unchecked")
51 | // the user must ensure that the set columns are correclty mapped.
52 | VirtualTableColumn relationType = (VirtualTableColumn)relationMappings
53 | .get(GanttRelationColumnType.RELATION_ID);
54 | relationDataContainer.setRelationType(relationType);
55 |
56 | VirtualTableColumn> entryId = relationMappings.get(GanttRelationColumnType.ENTRY_ID);
57 | relationDataContainer.setEntryId(entryId);
58 |
59 | VirtualTableColumn> relationRoot = relationMappings
60 | .get(GanttRelationColumnType.RELATION_PARENT_ID);
61 | relationDataContainer.setRelationRoot(relationRoot);
62 |
63 | return relationDataContainer;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/ganttchart/utils/XdevGanttPersistenceCalculationUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.ganttchart.utils;
19 |
20 |
21 | import com.jidesoft.gantt.GanttEntry;
22 |
23 |
24 | /**
25 | * Utility class to calculate values for comprehensive {@link GanttEntry}s.
26 | *
27 | * @author XDEV Software jwill
28 | * @since 4.0
29 | */
30 | public class XdevGanttPersistenceCalculationUtils
31 | {
32 |
33 | /**
34 | *
35 | * @param parentEntry
36 | * the parent entry to calculate the subentries completion from.
37 | *
38 | * @param
39 | * the gantt data type, for example Date
or
40 | * Integer
.
41 | *
42 | * Used for entry scaling via {@link GanttEntry#getRange()}
43 | *
44 | * .
45 | * @param
46 | * the customized {@link GanttEntry} type.
47 | *
48 | * @return the average completion of all subentries,
49 | */
50 | // have to type class based because jide base interface does not provide
51 | // #getSubEntries.
52 | public static > Double getParentCompletionValue(S parentEntry)
53 | {
54 | Double completion = 0.0;
55 |
56 | for(Object childEntry : parentEntry.getChildren())
57 | {
58 | // cant avoid cast because of JIDE API. (getParent returnVal !=
59 | // Generic
60 | // Type)
61 | GanttEntry> calcEntry = (GanttEntry>)childEntry;
62 | completion += calcEntry.getCompletion();
63 | }
64 |
65 | return completion / parentEntry.getChildren().size();
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideEclipse3xLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 |
23 |
24 | /**
25 | * A XDEV wrapper for Jides ECLIPSE3X_STYLE.
26 | *
27 | * @author XDEV Software
28 | */
29 | public class JideEclipse3xLookAndFeel extends SystemLookAndFeel
30 | {
31 | /**
32 | * {@inheritDoc}
33 | */
34 | @Override
35 | public void setLookAndFeel() throws LookAndFeelException
36 | {
37 | super.setLookAndFeel();
38 |
39 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.ECLIPSE3X_STYLE);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideEclipseLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 |
23 |
24 | /**
25 | * A XDEV wrapper for Jides ECLIPSE_STYLE.
26 | *
27 | * @author XDEV Software
28 | */
29 | public class JideEclipseLookAndFeel extends SystemLookAndFeel
30 | {
31 | /**
32 | * {@inheritDoc}
33 | */
34 | @Override
35 | public void setLookAndFeel() throws LookAndFeelException
36 | {
37 | super.setLookAndFeel();
38 |
39 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.ECLIPSE_STYLE);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideLookAndFeelExtension.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import javax.swing.UIManager;
22 |
23 | import com.jidesoft.plaf.LookAndFeelFactory;
24 | import com.jidesoft.utils.SystemInfo;
25 |
26 |
27 | /**
28 | * Customize the jide - look and feel to set, depending on the current OS.
29 | *
30 | * @author XDEV Software
31 | * @since CS 1.0
32 | *
33 | */
34 |
35 | public class JideLookAndFeelExtension implements LookAndFeelExtension
36 | {
37 | @Override
38 | public void installLookAndFeelExtension(LookAndFeel laf) throws LookAndFeelException
39 | {
40 | System.setProperty("shadingtheme","true");
41 |
42 | if(laf.getClass() == SystemLookAndFeel.class && SystemInfo.isWindows())
43 | {
44 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.XERTO_STYLE_WITHOUT_MENU);
45 | }
46 |
47 | LookAndFeelFactory.installJideExtension(LookAndFeelFactory.getDefaultStyle());
48 |
49 | UIManager.put("Chevron.alwaysVisible",Boolean.FALSE);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideOffice2003DefaultLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 |
23 |
24 | /**
25 | * A XDEV wrapper for Jides OFFICE2003_STYLE.
26 | *
27 | * @author XDEV Software
28 | */
29 | public class JideOffice2003DefaultLookAndFeel extends SystemLookAndFeel
30 | {
31 | /**
32 | * {@inheritDoc}
33 | */
34 | @Override
35 | public void setLookAndFeel() throws LookAndFeelException
36 | {
37 | super.setLookAndFeel();
38 |
39 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.OFFICE2003_STYLE);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideOffice2003GrayLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 | import com.jidesoft.plaf.office2003.Office2003Painter;
23 |
24 |
25 | /**
26 | * A XDEV wrapper for Jides OFFICE2003_STYLE.
27 | *
28 | * @author XDEV Software
29 | */
30 | public class JideOffice2003GrayLookAndFeel extends SystemLookAndFeel
31 | {
32 | /**
33 | * {@inheritDoc}
34 | */
35 | @Override
36 | public void setLookAndFeel() throws LookAndFeelException
37 | {
38 | super.setLookAndFeel();
39 |
40 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.OFFICE2003_STYLE);
41 |
42 | ((Office2003Painter)Office2003Painter.getInstance()).setColorName("Gray");
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideOffice2003HomeSteadLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 | import com.jidesoft.plaf.office2003.Office2003Painter;
23 |
24 |
25 | /**
26 | * A XDEV wrapper for Jides OFFICE2003_STYLE.
27 | *
28 | * @author XDEV Software
29 | */
30 | public class JideOffice2003HomeSteadLookAndFeel extends SystemLookAndFeel
31 | {
32 | /**
33 | * {@inheritDoc}
34 | */
35 | @Override
36 | public void setLookAndFeel() throws LookAndFeelException
37 | {
38 | super.setLookAndFeel();
39 |
40 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.OFFICE2003_STYLE);
41 |
42 | ((Office2003Painter)Office2003Painter.getInstance()).setColorName("HomeStead");
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideOffice2003MetallicLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 | import com.jidesoft.plaf.office2003.Office2003Painter;
23 |
24 |
25 | /**
26 | * A XDEV wrapper for Jides OFFICE2003_STYLE.
27 | *
28 | * @author XDEV Software
29 | */
30 | public class JideOffice2003MetallicLookAndFeel extends SystemLookAndFeel
31 | {
32 | /**
33 | * {@inheritDoc}
34 | */
35 | @Override
36 | public void setLookAndFeel() throws LookAndFeelException
37 | {
38 | super.setLookAndFeel();
39 |
40 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.OFFICE2003_STYLE);
41 |
42 | ((Office2003Painter)Office2003Painter.getInstance()).setColorName("Metallic");
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideOffice2003NormalColorLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 | import com.jidesoft.plaf.office2003.Office2003Painter;
23 |
24 |
25 | /**
26 | * A XDEV wrapper for Jides OFFICE2003_STYLE.
27 | *
28 | * @author XDEV Software
29 | */
30 | public class JideOffice2003NormalColorLookAndFeel extends SystemLookAndFeel
31 | {
32 | /**
33 | * {@inheritDoc}
34 | */
35 | @Override
36 | public void setLookAndFeel() throws LookAndFeelException
37 | {
38 | super.setLookAndFeel();
39 |
40 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.OFFICE2003_STYLE);
41 |
42 | ((Office2003Painter)Office2003Painter.getInstance()).setColorName("NormalColor");
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideOffice2007LookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 |
23 |
24 | /**
25 | * A XDEV wrapper for Jides OFFICE2007_STYLE.
26 | *
27 | * @author XDEV Software
28 | */
29 | public class JideOffice2007LookAndFeel extends SystemLookAndFeel
30 | {
31 | /**
32 | * {@inheritDoc}
33 | */
34 | @Override
35 | public void setLookAndFeel() throws LookAndFeelException
36 | {
37 | super.setLookAndFeel();
38 |
39 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.OFFICE2007_STYLE);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideVSNetLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 |
23 |
24 | /**
25 | * A XDEV wrapper for Jides VSNET_STYLE.
26 | *
27 | * @author XDEV Software
28 | */
29 | public class JideVSNetLookAndFeel extends SystemLookAndFeel
30 | {
31 | /**
32 | * {@inheritDoc}
33 | */
34 | @Override
35 | public void setLookAndFeel() throws LookAndFeelException
36 | {
37 | super.setLookAndFeel();
38 |
39 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.VSNET_STYLE);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/laf/JideXertoLookAndFeel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.laf;
19 |
20 |
21 | import com.jidesoft.plaf.LookAndFeelFactory;
22 |
23 |
24 | /**
25 | * A XDEV wrapper for Jides XERTO_STYLE.
26 | *
27 | * @author XDEV Software
28 | * @since CS 1.0
29 | */
30 | public class JideXertoLookAndFeel extends SystemLookAndFeel
31 | {
32 | /**
33 | * {@inheritDoc}
34 | */
35 | @Override
36 | public void setLookAndFeel() throws LookAndFeelException
37 | {
38 | super.setLookAndFeel();
39 |
40 | LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.XERTO_STYLE);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/listbox/CSListModelWrapperLookup.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.listbox;
19 |
20 |
21 | import javax.swing.ListModel;
22 |
23 | import com.jidesoft.list.ListModelWrapperUtils;
24 |
25 |
26 | public class CSListModelWrapperLookup extends DefaultListModelWrapperLookup
27 | {
28 | @Override
29 | public ListModel lookupListModel(ListModel outerModel, Class innerModelClass)
30 | {
31 | return ListModelWrapperUtils.getActualListModel(outerModel,innerModelClass);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/quickfilter/XdevNumberConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.quickfilter;
19 |
20 |
21 | import java.text.DecimalFormat;
22 | import java.text.NumberFormat;
23 |
24 | import com.jidesoft.converter.NaturalNumberConverter;
25 | import com.jidesoft.converter.NumberConverter;
26 |
27 |
28 | /**
29 | * A NumberConverter for QuickFilterFields
to consider default
30 | * number - rendering.
31 | *
32 | *
33 | * For example if 10000
is the value of a column - the user can
34 | * type 10000
as filterstring and the QuickFilter
35 | * hits this value (without essentially enter decimal points).
36 | *
37 | *
38 | * @author XDEV Software JWill
39 | *
40 | */
41 | // see Issue http://issues.xdev-software.de/view.php?id=12804
42 | public class XdevNumberConverter extends NaturalNumberConverter
43 | {
44 | /**
45 | * the stored {@link NumberFormat}.
46 | */
47 | private NumberFormat format;
48 |
49 |
50 | /**
51 | * Creates a {@link NumberConverter} which considers default number -
52 | * rendering.
53 | *
54 | */
55 | public XdevNumberConverter()
56 | {
57 | super();
58 | }
59 |
60 |
61 | /**
62 | * Creates a {@link NumberConverter} which considers default number -
63 | * rendering.
64 | *
65 | * @param paramNumberFormat
66 | * a customized numberformat to consider.
67 | */
68 | public XdevNumberConverter(NumberFormat paramNumberFormat)
69 | {
70 | super(paramNumberFormat);
71 | }
72 |
73 |
74 | /**
75 | * {@inheritDoc}
76 | */
77 | @Override
78 | public void setNumberFormat(NumberFormat paramNumberFormat)
79 | {
80 | super.setNumberFormat(paramNumberFormat);
81 | this.format = paramNumberFormat;
82 | }
83 |
84 |
85 | /**
86 | * {@inheritDoc}
87 | */
88 | @Override
89 | protected NumberFormat getNumberFormat()
90 | {
91 | if(this.format == null)
92 | {
93 | // ignore decimal points
94 | this.format = new DecimalFormat("0");
95 |
96 | this.format.setMaximumIntegerDigits(Integer.MAX_VALUE);
97 | this.format.setGroupingUsed(isGroupingUsed());
98 | }
99 | return this.format;
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/table/CSTableColumnConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.table;
19 |
20 |
21 | import javax.swing.JTable;
22 |
23 | import xdev.vt.VirtualTable;
24 | import xdev.vt.VirtualTableWrapper;
25 |
26 | import com.jidesoft.grid.TableModelWrapperUtils;
27 |
28 |
29 | /**
30 | * Specifies the contract between a Table which modifies its columns and a
31 | * {@link VirtualTable} used for TableModel purpose.
32 | *
33 | * This interface guarantees that the modified data is handled properly
34 | * independent of the filtered model
35 | *
36 | *
37 | *
38 | * For Example if the Table modifies it�s column count -
39 | * {@link TableColumnConverter#viewToModel(JTable, int)} can be used to identify
40 | * non model columns.
41 | *
42 | *
43 | * @author XDEV Software (JW)
44 | * @since 3.1
45 | */
46 | public class CSTableColumnConverter extends DefaultTableColumnConverter
47 | {
48 |
49 | /**
50 | * {@inheritDoc}
51 | */
52 | @Override
53 | public int viewToModel(JTable table, int column)
54 | {
55 | column = super.viewToModel(table,column);
56 |
57 | if(TableModelWrapperUtils.getActualTableModel(table.getModel(),
58 | VirtualTableWrapper.class) != null)
59 | {
60 | column = TableModelWrapperUtils.getActualColumnAt(table.getModel(),column,
61 | VirtualTableWrapper.class);
62 | }
63 |
64 | return column;
65 | }
66 |
67 |
68 | /**
69 | * {@inheritDoc}
70 | */
71 | @Override
72 | public int modelToView(JTable table, int column)
73 | {
74 | column = super.modelToView(table,column);
75 |
76 | if(TableModelWrapperUtils.getActualTableModel(table.getModel(),
77 | VirtualTableWrapper.class) != null)
78 | {
79 | column = TableModelWrapperUtils.getColumnAt(table.getModel(),TableModelWrapperUtils
80 | .getActualTableModel(table.getModel(),VirtualTableWrapper.class),column);
81 | }
82 |
83 | return column;
84 | }
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/table/CSTableModelWrapperLookup.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.table;
19 |
20 |
21 | import javax.swing.table.TableModel;
22 |
23 | import com.jidesoft.grid.TableModelWrapperUtils;
24 |
25 |
26 | public class CSTableModelWrapperLookup extends DefaultTableModelWrapperLookup
27 | {
28 | @Override
29 | public TableModel lookupTableModel(TableModel outerModel, Class innerModelClass)
30 | {
31 | TableModel model = super.lookupTableModel(outerModel,innerModelClass);
32 | if(model != null)
33 | {
34 | return model;
35 | }
36 |
37 | return TableModelWrapperUtils.getActualTableModel(outerModel,innerModelClass);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/table/CellStyleTableRenderer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.table;
19 |
20 |
21 | import java.awt.Component;
22 |
23 | import javax.swing.JTable;
24 | import javax.swing.table.TableCellRenderer;
25 |
26 |
27 | /**
28 | * This implementation of {@link TableCellRenderer} is meant to provide visual
29 | * cell styling of individual table cells based on the value and/or properties
30 | * of a field from a Virtual Table instance.
31 | *
32 | * This class decorates other TableCellRenderers and modifies the cell component
33 | * after those other renderer's, building a renderer chain.
34 | *
35 | *
36 | * @author XDEV Software
37 | *
38 | */
39 | public class CellStyleTableRenderer implements TableCellRenderer
40 | {
41 | /**
42 | * The previous renderer responsible for doing the initial rendering.
43 | */
44 | private TableCellRenderer previousRenderer;
45 |
46 |
47 | /**
48 | * Creates a new instance.
49 | *
50 | * @param previousRenderer
51 | * the previous TableCellRenderer.
52 | */
53 | public CellStyleTableRenderer(TableCellRenderer previousRenderer)
54 | {
55 | this.previousRenderer = previousRenderer;
56 | }
57 |
58 |
59 | @Override
60 | public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
61 | boolean hasFocus, int row, int column)
62 | {
63 | Component component = previousRenderer.getTableCellRendererComponent(table,value,
64 | isSelected,hasFocus,row,column);
65 |
66 | /*
67 | * TODO: Currently this renderer doesn't modify the appearance of the
68 | * cell. Implementation of vt cell specific modifications should be done
69 | * here...
70 | */
71 | // VirtualTableModel vtm =
72 | // (VirtualTableModel)TableModelWrapperUtils.getActualTableModel(table.getModel(),
73 | // VirtualTableModel.class);
74 |
75 | return component;
76 | }
77 |
78 |
79 | /**
80 | * @return the previous {@link TableCellRenderer}.
81 | */
82 | public TableCellRenderer getPreviousRenderer()
83 | {
84 | return previousRenderer;
85 | }
86 |
87 | }
88 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/table/JideSortItemUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.table;
19 |
20 |
21 | import java.util.ArrayList;
22 | import java.util.List;
23 |
24 | import com.jidesoft.grid.ISortableTableModel.SortItem;
25 |
26 |
27 | /**
28 | *
29 | * @author XDEV Software
30 | * @since 4.0
31 | */
32 | public class JideSortItemUtils
33 | {
34 | /**
35 | *
36 | * @param originalItems
37 | * @param newItems
38 | * @return {@code true} if equal
39 | */
40 | public static boolean equalsSortItemCriteria(List originalItems,
41 | List newItems)
42 | {
43 | if(originalItems.size() != newItems.size())
44 | {
45 | return false;
46 | }
47 |
48 | for(int i = 0; i < originalItems.size(); i++)
49 | {
50 | SortItem originalItem = originalItems.get(i);
51 | SortItem newItem = newItems.get(i);
52 |
53 | if(originalItem.getColumn() != newItem.getColumn()
54 | || originalItem.isAscending() != newItem.isAscending())
55 | {
56 | return false;
57 | }
58 | }
59 | return true;
60 | }
61 |
62 |
63 | /**
64 | *
65 | * @param currentItems
66 | * @return {@link List} of {@link SortItem}
67 | */
68 | public static List copySortedItems(List currentItems)
69 | {
70 | List copy = new ArrayList<>();
71 |
72 | for(SortItem sortItem : currentItems)
73 | {
74 | copy.add(new SortItem(sortItem.getColumn(),sortItem.isAscending()));
75 | }
76 |
77 | return copy;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/util/ColorParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.util;
19 |
20 |
21 | import java.awt.Color;
22 |
23 |
24 | /**
25 | * ColorParser is able to convert a {@link Color} in its data object value.
26 | *
27 | * For example {@link Color#red} would be 255,0,0.
28 | *
29 | *
30 | * @author XDEV Software jwill
31 | *
32 | * @param
33 | * the data object value type, for example {@link String} or
34 | * {@link Number}.
35 | * @since 4.0
36 | */
37 | public interface ColorParser
38 | {
39 | /**
40 | * Returns the {@link Color} representation of the given value.
41 | *
42 | * @param colorValue
43 | * the color value to convert.
44 | * @return the converted {@link Color}.
45 | */
46 | Color getColorFromValue(CT colorValue);
47 |
48 |
49 | /**
50 | * Returns the color value representation of the given {@link Color}.
51 | *
52 | * @param color
53 | * the {@link Color} to convert.
54 | * @return the converted color value.
55 | */
56 | CT getValueFromColor(Color color);
57 |
58 |
59 | /**
60 | * Determines whether alpha should be considered in computation.
61 | *
62 | * @return the alpha computation state.
63 | */
64 | boolean isAlphaIncluded();
65 |
66 |
67 | /**
68 | * Determines whether alpha should be considered in computation.
69 | *
70 | * @param alphaIncluded
71 | * the alpha computation state.
72 | */
73 | void setAlphaIncluded(boolean alphaIncluded);
74 | }
75 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/utils/ColorParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.utils;
19 |
20 |
21 | import java.awt.Color;
22 |
23 |
24 | /**
25 | * Parses color values, for example RGB, HEX-String
s or color
26 | * Integer
color values to {@link Color} objects.
27 | *
28 | * @author XDEV Software jwill
29 | * @since 4.0
30 | */
31 | public interface ColorParser
32 | {
33 | /**
34 | * Parses RGB color Strings
into their {@link Color}
35 | * representation.
36 | *
37 | * @param rgbColorValue
38 | * the rgbColorValue
39 | *
40 | * @return the {@link Color} representation of the given color
41 | * String
or null
if the given value is
42 | * not valid.
43 | */
44 | public Color convertFromRGBString(String rgbColorValue);
45 |
46 |
47 | /**
48 | * Parses HEX color Strings
into their {@link Color}
49 | * representation.
50 | *
51 | * @param hexColorValue
52 | * the hexColorValue.
53 | *
54 | * @return the {@link Color} representation of the given color
55 | * String
or null
if the given value is
56 | * not valid.
57 | */
58 | public Color convertFromHexString(String hexColorValue);
59 |
60 |
61 | /**
62 | * Parses Integer
colors into their {@link Color}
63 | * representation.
64 | *
65 | * @param integerColorvalue
66 | * the integerColorvalue.
67 | *
68 | * @return the {@link Color} representation of the given color
69 | * Integer
or null
if the given value is
70 | * not valid.
71 | */
72 | public Color convertFromInteger(Integer integerColorvalue);
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/valuechooser/ValueChooser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.valuechooser;
19 |
20 |
21 | import xdev.lang.NotNull;
22 | import xdev.lang.Nullable;
23 |
24 |
25 | /**
26 | * A {@link ValueChooser} is a component that enables a user to select a single
27 | * value from a list of possible values.
28 | *
29 | *
30 | * A {@link ValueChooser} is typically, but not necessarily, implemented as
31 | * popup or dialog.
32 | *
33 | *
34 | *
35 | * {@link ValueChooser} is always complemented with a ValueChooserField for
36 | * displaying the selected values.
37 | *
38 | *
39 | * @param
40 | * The value's type
41 | *
42 | * @since CS 1.0
43 | * @author XDEV Software (RHHF)
44 | *
45 | * @see ValueChooserField
46 | *
47 | */
48 | public interface ValueChooser
49 | {
50 |
51 | /**
52 | * Makes the {@link ValueChooser} visible.
53 | *
54 | * @param owner
55 | * {@link ValueChooserField} that called the method
56 | */
57 | public void show(final @NotNull ValueChooserField owner);
58 |
59 |
60 | /**
61 | * Returns the chosen value.
62 | *
63 | * @return the chosen value.
64 | */
65 | @Nullable
66 | public T getSelectValue();
67 |
68 |
69 | /**
70 | * returns either true if the {@link ValueChooser} was successfully
71 | * initialized or false if not.
72 | *
73 | * For example returns true after the table model has been set.
74 | *
75 | * @return the initialization state.
76 | */
77 | public boolean getInitState();
78 |
79 |
80 | /**
81 | * Resets the {@link ValueChooser}.
82 | */
83 | public void reset();
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/src/main/java/xdev/ui/valuechooser/ValueChooserField.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.ui.valuechooser;
19 |
20 |
21 | import java.awt.Component;
22 |
23 |
24 | /**
25 | * A {@link ValueChooserField} is a component that displays a single selected
26 | * value. To chose a value from a list of possible values a {@link ValueChooser}
27 | * is displayed
28 | *
29 | *
30 | * @since CS 1.0
31 | * @author XDEV Software (RHHF)
32 | *
33 | * @see ValueChooser
34 | *
35 | */
36 | public interface ValueChooserField
37 | {
38 | /**
39 | * Is called by the chooser after it has closed.
40 | */
41 | public void chooserClosed();
42 |
43 |
44 | /**
45 | * Returns the {@link ValueChooserField} component.
46 | *
47 | * @return the {@link ValueChooserField} component.
48 | */
49 | public Component getComponent();
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/resources/icons/dockableframe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/icons/dockableframe.png
--------------------------------------------------------------------------------
/src/main/resources/icons/tabbedpane_close.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/icons/tabbedpane_close.gif
--------------------------------------------------------------------------------
/src/main/resources/icons/tabbedpane_closeall.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/icons/tabbedpane_closeall.gif
--------------------------------------------------------------------------------
/src/main/resources/icons/tabbedpane_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/icons/tabbedpane_next.png
--------------------------------------------------------------------------------
/src/main/resources/icons/tabbedpane_prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/icons/tabbedpane_prev.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/add.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/al_center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/al_center.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/al_just.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/al_just.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/al_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/al_left.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/al_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/al_right.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/archives.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/archives.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/arcs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/arcs.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/blog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/blog.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/blog_glow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/blog_glow.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/blogpages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/blogpages.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/bold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/bold.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/br.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/br.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/browser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/browser.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/cancel.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/categories.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/categories.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/cats.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/cats.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/cogs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/cogs.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/color.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/comp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/comp.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/complete.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/config.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/copy.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/copyright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/copyright.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/current.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/current.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/cut.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/delete.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/down.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/download.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/drafts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/drafts.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/edit1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/edit1.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/email.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/err_feed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/err_feed.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/err_feed1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/err_feed1.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/export.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/failed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/failed.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/feed_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/feed_icon.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/find.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/find.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/fontsize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/fontsize.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/help.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/home.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/hrule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/hrule.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/html.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/image.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/img_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/img_file.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/import.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/import.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/italic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/italic.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/link.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/link1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/link1.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/link3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/link3.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/listordered.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/listordered.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/listunordered.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/listunordered.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/magnify_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/magnify_down.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/magnify_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/magnify_up.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/new_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/new_folder.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/paste.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/pencil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/pencil.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/pin.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/ping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/ping.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/post.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/post_pub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/post_pub.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/pub_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/pub_all.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/redo.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/refresh.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/remove.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/save.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/spellcheck.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/spellcheck.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/table.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/tamb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/tamb.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/transfer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/transfer.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/trash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/trash.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/trash1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/trash1.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/underline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/underline.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/undo.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/up.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/update_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/update_folder.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/update_post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/update_post.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/update_post_pub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/update_post_pub.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/upload.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/users.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/users.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/webloglink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/webloglink.png
--------------------------------------------------------------------------------
/src/main/resources/resources/images/x16/webpages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/resources/images/x16/webpages.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/charts/model/res/XdevChartAxisType.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | timeNumericAxis = X: Date Y: Numeric
23 | numericNumericAxis = X: Numeric Y: Numeric
24 | stringNumericAxis = X: String Y: Numeric
25 | stringTimeAxis = X: String Y: Date
26 | numberTimeAxis = X: Numeric Y: Date
27 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/charts/model/res/XdevChartAxisType_de.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | timeNumericAxis = X: Datum Y: Numerisch
23 | numericNumericAxis = X: Numerisch Y: Numerisch
24 | stringNumericAxis = X: String Y: Numerisch
25 | stringTimeAxis = X: String Y: Datum
26 | numberTimeAxis = X: Numerisch Y: Datum
27 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/action/GanttTemplateRemoveKeyAdapter.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | Y = Yes
23 | N = No
24 | Title = Delete entry
25 | Message = Do you really want to delete this entry?
26 |
27 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/action/GanttTemplateRemoveKeyAdapter_de.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | Y = Ja
23 | N = Nein
24 | Title = Eintrag löschen
25 | Message = Wollen Sie diesen Eintrag wirklich löschen?
26 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/action/VirtualTableUpdateDateGanttChartPopupMenuCustomizer.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | EDITENTRY = Edit Entry
23 | CREATEENTRY = Create Entry
24 | CREATECHILDENTRY = Create child Entry
25 | REMOVEENTRY = Remove Entry
26 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/action/VirtualTableUpdateDateGanttChartPopupMenuCustomizer_de.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | EDITENTRY = Eintrag bearbeiten
23 | CREATEENTRY = Neuer Eintrag
24 | CREATECHILDENTRY = Sub-Eintrag erzeugen
25 | REMOVEENTRY = Eintrag entfernen
26 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/add.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/close_b_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/close_b_48.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/connect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/connect.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/disconnect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/disconnect.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/edit.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/finish_to_finish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/finish_to_finish.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/finish_to_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/finish_to_start.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/new.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/ok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/ok.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/remove.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/start_to_finish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/start_to_finish.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/icons/start_to_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdev-software/csapi/3ec716d27282dac17a14787c6d7bbb287314eeb7/src/main/resources/xdev/ui/ganttchart/icons/start_to_start.png
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/utils/DatePeriodType.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | AM_PM = AM/PM
23 | CENTURY = Century
24 | DAY_OF_MONTH = Day of month
25 | DAY_OF_WEEK = Day of week
26 | DAY_OF_WEEK_IN_MONTH = Day of week in month
27 | DAY_OF_YEAR = Day of year
28 | DECENNIUM = Decennium
29 | FIRST_DAY_OF_WEEK = First day of week
30 | HOUR = Hour
31 | HOUR_OF_DAY = Hour of day
32 | MILLENIUM = Millenium
33 | MILLISECOND = Millisecond
34 | MINUTE = Minute
35 | MONTH = Month
36 | QUARTER = Quarter
37 | SECOND = Second
38 | WEEK_OF_MONTH = Week of month
39 | WEEK_OF_YEAR = Week of year
40 | YEAR = Year
41 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/ganttchart/utils/DatePeriodType_de.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | AM_PM = Vormittag/Nachmittag
23 | CENTURY = Jahrhundert
24 | DAY_OF_MONTH = Monatstage
25 | DAY_OF_WEEK = Wochentage
26 | DAY_OF_WEEK_IN_MONTH = Wochentag im Monat
27 | DAY_OF_YEAR = Jahrestage
28 | DECENNIUM = Jahrzehnt
29 | FIRST_DAY_OF_WEEK = Erster Tag der Woche
30 | HOUR = Stunde
31 | HOUR_OF_DAY = Stunde (Tag)
32 | MILLENIUM = Millenium
33 | MILLISECOND = Millisekunde
34 | MINUTE = Minute
35 | MONTH = Monat
36 | QUARTER = Quartal
37 | SECOND = Sekunde
38 | WEEK_OF_MONTH = Monatswoche
39 | WEEK_OF_YEAR = Kalenderwoche
40 | YEAR = Jahr
41 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/language.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | # default properties for calendar (english)
23 |
24 | tabbedpane2.contextmenu.close=Close
25 | tabbedpane2.contextmenu.closeAll=Close All
26 | tabbedpane2.contextmenu.closeOthers=Close Others
27 | tabbedpane2.contextmenu.next=Next
28 | tabbedpane2.contextmenu.prev=Previous
29 |
30 | valuechooser.title=Choose a value
31 | valuechooser.ok=Accept value
32 | valuechooser.cancel=Cancel selection
33 |
34 |
--------------------------------------------------------------------------------
/src/main/resources/xdev/ui/language_de.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # #%L
3 | # XDEV Component Suite
4 | # %%
5 | # Copyright (C) 2011 - 2021 XDEV Software
6 | # %%
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Lesser General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Lesser Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Lesser Public
18 | # License along with this program. If not, see
19 | # .
20 | # #L%
21 | ###
22 | tabbedpane2.contextmenu.close=Schlie�en
23 | tabbedpane2.contextmenu.closeAll=Alle Schlie�en
24 | tabbedpane2.contextmenu.closeOthers=Andere Schlie�en
25 | tabbedpane2.contextmenu.next=N�chster
26 | tabbedpane2.contextmenu.prev=Vorheriger
27 |
28 | valuechooser.title=W�hlen Sie einen Wert aus
29 | valuechooser.ok=Auswahl �bernehmen
30 | valuechooser.cancel=Auswahl abbrechen
31 |
--------------------------------------------------------------------------------
/src/test/java/xdev/category/UITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * XDEV Component Suite - XDEV Component Suite
3 | * Copyright © 2011 XDEV Software (https://xdev.software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Lesser General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this program. If not, see .
17 | */
18 | package xdev.category;
19 |
20 | /**
21 | * Tests with that category require a UI.
22 | * e.g. a Display
23 | *
24 | */
25 | public interface UITest
26 | {
27 | // Nothing
28 | }
29 |
--------------------------------------------------------------------------------