-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added license file header and and class descriptions. So the gui pack…
…age complies with #14
- Loading branch information
ChornHulio
committed
Apr 14, 2011
1 parent
87fa522
commit 38bcc42
Showing
11 changed files
with
272 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui; | ||
|
||
import java.util.LinkedList; | ||
|
@@ -18,6 +35,15 @@ | |
import forgetit.logic.ILogicTags; | ||
import forgetit.logic.interfaces.ICalendar; | ||
|
||
/** | ||
* The "controller" of the gui | ||
* | ||
* GraphicsController is the interface between GraphicsModel and the views. | ||
* The gui-package works like the MVC-Pattern descripes. | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class GraphicsController { | ||
|
||
private Display display = null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui; | ||
|
||
import java.util.LinkedList; | ||
|
@@ -11,6 +28,15 @@ | |
import forgetit.logic.ILogicTags; | ||
import forgetit.logic.interfaces.ICalendar; | ||
|
||
/** | ||
* The "data model" of the gui | ||
* | ||
* GraphicsModel is the interface to the logic layer. It takes and holds the data. | ||
* The gui-package works like the MVC-Pattern descripes. | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class GraphicsModel { | ||
|
||
private ILogicTags logicTags = null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui; | ||
|
||
import org.eclipse.swt.SWT; | ||
|
@@ -21,6 +38,12 @@ | |
import forgetit.gui.views.ViewTags; | ||
import forgetit.gui.views.ViewTodo; | ||
|
||
/** | ||
* main window which creates the different views | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class MainWindow { | ||
|
||
private Shell shell = null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui.dialogs; | ||
|
||
import java.util.LinkedList; | ||
|
@@ -20,6 +37,12 @@ | |
import forgetit.common.Function; | ||
import forgetit.common.Tag; | ||
|
||
/** | ||
* A dialog for adding entities | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class AddEntityDialog extends Dialog { | ||
|
||
private Shell shell = null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui.views; | ||
|
||
import java.util.List; | ||
|
||
import forgetit.common.Category; | ||
import forgetit.common.Entity; | ||
|
||
/** | ||
* Through IEntitiesView the different views can be refreshed by GraphicsController. | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public interface IEntitiesView { | ||
|
||
public void refreshView(List<Entity> entities); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui.views; | ||
|
||
import org.eclipse.swt.SWT; | ||
|
@@ -8,6 +25,12 @@ | |
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Label; | ||
|
||
/** | ||
* The outer design (borders, titles, ...) of the different views which extends this class | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class StandardView extends Composite { | ||
|
||
private String title; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui.views; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.RowLayout; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Label; | ||
import org.eclipse.swt.widgets.Table; | ||
import org.eclipse.swt.widgets.TableColumn; | ||
import org.eclipse.swt.widgets.TableItem; | ||
|
@@ -14,6 +30,15 @@ | |
import forgetit.common.Entity; | ||
import forgetit.logic.Calendar; | ||
|
||
/** | ||
* The view for todos | ||
* | ||
* The outer design (borders, titles, ...) of this view is dependent on StandardView. | ||
* Through IEntitiesView this view can be refreshed by GraphicsController. | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class ViewCalendar extends StandardView implements IEntitiesView { | ||
|
||
Composite parent; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui.views; | ||
|
||
import org.eclipse.swt.SWT; | ||
|
@@ -12,6 +29,14 @@ | |
|
||
import forgetit.gui.GraphicsController; | ||
|
||
/** | ||
* The view for start and end date settings | ||
* | ||
* The outer design (borders, titles, ...) of this view is dependent on StandardView | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class ViewDate extends StandardView { | ||
|
||
Composite parent = null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,43 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui.views; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.GridData; | ||
import org.eclipse.swt.layout.RowLayout; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Event; | ||
import org.eclipse.swt.widgets.Label; | ||
import org.eclipse.swt.widgets.Listener; | ||
import org.eclipse.swt.widgets.Table; | ||
import org.eclipse.swt.widgets.TableColumn; | ||
import org.eclipse.swt.widgets.TableItem; | ||
|
||
import forgetit.common.Category; | ||
import forgetit.common.Entity; | ||
|
||
/** | ||
* The view for notes | ||
* | ||
* The outer design (borders, titles, ...) of this view is dependent on StandardView. | ||
* Through IEntitiesView this view can be refreshed by GraphicsController. | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class ViewNotes extends StandardView implements IEntitiesView { | ||
|
||
Composite parent; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
* Copyright 2011 DHBW Stuttgart Campus Horb | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package forgetit.gui.views; | ||
|
||
import java.util.List; | ||
|
@@ -12,6 +29,14 @@ | |
|
||
import forgetit.gui.GraphicsController; | ||
|
||
/** | ||
* The view for choosing tags | ||
* | ||
* The outer design (borders, titles, ...) of this view is dependent on StandardView | ||
* | ||
* @author ChornHulio (<a href="mailto:[[email protected]]">[email protected]</a>) | ||
* @since 0.1 | ||
*/ | ||
public class ViewTags extends StandardView { | ||
|
||
Composite parent; | ||
|
Oops, something went wrong.