This file contains hidden or 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
| /* | |
| * Copyright (c) 2012, Metron, Inc. | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * * Redistributions of source code must retain the above copyright | |
| * notice, this list of conditions and the following disclaimer. | |
| * * Redistributions in binary form must reproduce the above copyright | |
| * notice, this list of conditions and the following disclaimer in the |
This file contains hidden or 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
| /* | |
| * Copyright (c) 2012, Metron, Inc. | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * * Redistributions of source code must retain the above copyright | |
| * notice, this list of conditions and the following disclaimer. | |
| * * Redistributions in binary form must reproduce the above copyright |
This file contains hidden or 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
| import java.io.IOException; | |
| import java.util.Collection; | |
| import com.metsci.glimpse.axis.Axis1D; | |
| import com.metsci.glimpse.axis.Axis2D; | |
| import com.metsci.glimpse.event.mouse.GlimpseMouseAdapter; | |
| import com.metsci.glimpse.event.mouse.GlimpseMouseEvent; | |
| import com.metsci.glimpse.event.mouse.GlimpseMouseMotionListener; | |
| import com.metsci.glimpse.examples.Example; | |
| import com.metsci.glimpse.examples.basic.HeatMapExample; |
This file contains hidden or 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
| /* | |
| * Copyright (c) 2012, Metron, Inc. | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * * Redistributions of source code must retain the above copyright | |
| * notice, this list of conditions and the following disclaimer. | |
| * * Redistributions in binary form must reproduce the above copyright | |
| * notice, this list of conditions and the following disclaimer in the |
This file contains hidden or 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
| // replace the default StackedTimePlot2D mouse listener behavior with | |
| // the default tagged axis behavior (the selected area will not follow | |
| // the mouse, but the user can move it by clicking and dragging inside | |
| // the selected area) | |
| plot.setTimeAxisMouseListener( new TaggedAxisMouseListener1D( ) ); | |
| // lock the timeline at the current max selection value | |
| plot.setCurrentTimeLocked( true ); | |
| // add a constraint which prevents the max selection value |
This file contains hidden or 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
| final TimeStamp maxTimeStamp = t0.add( Time.fromMinutes( 300 ) ); | |
| final double maxTime = plot.fromTimeStamp( maxTimeStamp ); | |
| // add a constraint which prevents the max selection value | |
| // from moving past the max timeline value | |
| plot.getTimeAxis( ).addConstraint( new Constraint( ) | |
| { | |
| @Override | |
| public String getName( ) | |
| { |
This file contains hidden or 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
| import com.metsci.glimpse.examples.Example; | |
| import com.metsci.glimpse.layout.GlimpseAxisLayout2D; | |
| import com.metsci.glimpse.painter.info.AnnotationPainter; | |
| import com.metsci.glimpse.painter.info.AnnotationPainter.AnnotationFont; | |
| import com.metsci.glimpse.plot.timeline.StackedTimePlot2D; | |
| import com.metsci.glimpse.plot.timeline.layout.TimePlotInfo; | |
| import com.metsci.glimpse.support.color.GlimpseColor; | |
| import com.metsci.glimpse.support.settings.OceanLookAndFeel; | |
| import com.metsci.glimpse.util.units.time.Time; | |
| import com.metsci.glimpse.util.units.time.TimeStamp; |
This file contains hidden or 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
| import com.metsci.glimpse.axis.Axis1D; | |
| import com.metsci.glimpse.axis.painter.label.GridAxisLabelHandler; | |
| import com.metsci.glimpse.examples.Example; | |
| import com.metsci.glimpse.plot.timeline.StackedTimePlot2D; | |
| import com.metsci.glimpse.plot.timeline.layout.TimePlotInfo; | |
| import com.metsci.glimpse.support.settings.OceanLookAndFeel; | |
| public class CustomAxisTicksExample extends CollapsibleTimelinePlotExample | |
| { | |
| public static void main( String[] args ) throws Exception |
This file contains hidden or 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
| import com.metsci.glimpse.examples.Example; | |
| import com.metsci.glimpse.layout.GlimpseAxisLayout2D; | |
| import com.metsci.glimpse.painter.shape.PolygonPainter; | |
| import com.metsci.glimpse.plot.timeline.StackedTimePlot2D; | |
| import com.metsci.glimpse.plot.timeline.data.Epoch; | |
| import com.metsci.glimpse.plot.timeline.layout.TimePlotInfo; | |
| import com.metsci.glimpse.support.color.GlimpseColor; | |
| import com.metsci.glimpse.support.settings.OceanLookAndFeel; | |
| import com.metsci.glimpse.util.units.time.Time; | |
| import com.metsci.glimpse.util.units.time.TimeStamp; |