-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creates the new string matrix. Improves and implement the usage of th…
…e new matrix in the matrix editor and the matrix manager.
- Loading branch information
1 parent
a7199ce
commit ad1e86b
Showing
17 changed files
with
2,425 additions
and
273 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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
40 changes: 40 additions & 0 deletions
40
plugins/net.bioclipse.statistics/src/net/bioclipse/statistics/ColHeaderDelegate.java
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package net.bioclipse.statistics; | ||
|
||
import net.bioclipse.statistics.editors.MatrixEditor; | ||
|
||
import org.eclipse.jface.action.IAction; | ||
import org.eclipse.jface.viewers.ISelection; | ||
import org.eclipse.ui.IEditorActionDelegate; | ||
import org.eclipse.ui.IEditorPart; | ||
|
||
/** | ||
* Handles the column-header toggle-button. | ||
* | ||
* @author Klas Jšnsson (klas.joensson@gmail.com) | ||
* | ||
*/ | ||
public class ColHeaderDelegate implements IEditorActionDelegate { | ||
|
||
private IEditorPart targetPart; | ||
|
||
public void run( IAction action ) { | ||
if (targetPart != null && action != null) | ||
if (targetPart instanceof MatrixEditor) | ||
action.setChecked( ((MatrixEditor) targetPart).runColumnHeaderAction() ); | ||
|
||
} | ||
|
||
public void selectionChanged( IAction action, ISelection selection ) { | ||
if (targetPart instanceof MatrixEditor) | ||
action.setChecked( ((MatrixEditor) targetPart).hasColumnHeader() ); | ||
} | ||
|
||
public void setActiveEditor( IAction action, IEditorPart targetEditor ) { | ||
targetPart = targetEditor; | ||
if (targetPart instanceof MatrixEditor) { | ||
action.setChecked( ((MatrixEditor) targetPart).hasColumnHeader() ); | ||
((MatrixEditor) targetPart).addActionDelegate( this ); | ||
} | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
plugins/net.bioclipse.statistics/src/net/bioclipse/statistics/RowHeaderDelegate.java
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package net.bioclipse.statistics; | ||
|
||
import net.bioclipse.statistics.editors.MatrixEditor; | ||
|
||
import org.eclipse.jface.action.IAction; | ||
import org.eclipse.jface.viewers.ISelection; | ||
import org.eclipse.ui.IEditorActionDelegate; | ||
import org.eclipse.ui.IEditorPart; | ||
|
||
/** | ||
* Handles the row-header toggle-button. | ||
* | ||
* @author Klas Jšnsson (klas.joensson@gmail.com) | ||
* | ||
*/ | ||
public class RowHeaderDelegate implements IEditorActionDelegate { | ||
|
||
private IEditorPart targetPart; | ||
|
||
public void run( IAction action ) { | ||
if (targetPart != null && action != null) { | ||
if (targetPart instanceof MatrixEditor) | ||
action.setChecked( ((MatrixEditor) targetPart).runRowHeaderAction() ); | ||
} | ||
|
||
} | ||
|
||
public void selectionChanged( IAction action, ISelection selection ) { | ||
if (targetPart instanceof MatrixEditor) { | ||
action.setChecked( ((MatrixEditor) targetPart).hasRowHeader() ); | ||
|
||
} | ||
} | ||
|
||
public void setActiveEditor( IAction action, IEditorPart targetEditor ) { | ||
targetPart = targetEditor; | ||
if (targetPart instanceof MatrixEditor) { | ||
action.setChecked( ((MatrixEditor) targetPart).hasRowHeader() ); | ||
((MatrixEditor) targetPart).addActionDelegate( this ); | ||
} | ||
|
||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
....bioclipse.statistics/src/net/bioclipse/statistics/describer/MatrixResourceDescriber.java
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package net.bioclipse.statistics.describer; | ||
|
||
import net.bioclipse.core.business.BioclipseException; | ||
import net.bioclipse.core.domain.IBioObject; | ||
import net.bioclipse.statistics.model.IMatrixResource; | ||
import net.bioclipse.ui.business.describer.IBioObjectDescriber; | ||
|
||
|
||
public class MatrixResourceDescriber implements IBioObjectDescriber { | ||
|
||
public MatrixResourceDescriber() { | ||
|
||
} | ||
|
||
public String getPreferredEditorID( IBioObject object ) | ||
throws BioclipseException { | ||
|
||
if (object instanceof IMatrixResource) { | ||
String [] possibleEditorIDs = | ||
((IMatrixResource) object).getEditorIDs(); | ||
/* Let's assume that the first in the array is the one that is | ||
* preferred.*/ | ||
return possibleEditorIDs[0]; | ||
} | ||
return null; | ||
} | ||
|
||
} |
Oops, something went wrong.