Skip to content

Commit

Permalink
Added license file header and and class descriptions. So the gui pack…
Browse files Browse the repository at this point in the history
…age complies with #14
  • Loading branch information
ChornHulio committed Apr 14, 2011
1 parent 87fa522 commit 38bcc42
Show file tree
Hide file tree
Showing 11 changed files with 272 additions and 6 deletions.
26 changes: 26 additions & 0 deletions forgetIT/src/forgetit/gui/GraphicsController.java
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;
Expand All @@ -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;
Expand Down
26 changes: 26 additions & 0 deletions forgetIT/src/forgetit/gui/GraphicsModel.java
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;
Expand All @@ -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;
Expand Down
23 changes: 23 additions & 0 deletions forgetIT/src/forgetit/gui/MainWindow.java
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;
Expand All @@ -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;
Expand Down
23 changes: 23 additions & 0 deletions forgetIT/src/forgetit/gui/dialogs/AddEntityDialog.java
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;
Expand All @@ -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;
Expand Down
23 changes: 23 additions & 0 deletions forgetIT/src/forgetit/gui/views/IEntitiesView.java
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);
Expand Down
23 changes: 23 additions & 0 deletions forgetIT/src/forgetit/gui/views/StandardView.java
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;
Expand All @@ -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;
Expand Down
27 changes: 26 additions & 1 deletion forgetIT/src/forgetit/gui/views/ViewCalendar.java
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;
Expand All @@ -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;
Expand Down
25 changes: 25 additions & 0 deletions forgetIT/src/forgetit/gui/views/ViewDate.java
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;
Expand All @@ -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;
Expand Down
30 changes: 26 additions & 4 deletions forgetIT/src/forgetit/gui/views/ViewNotes.java
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;
Expand Down
25 changes: 25 additions & 0 deletions forgetIT/src/forgetit/gui/views/ViewTags.java
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;
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 38bcc42

Please sign in to comment.